summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2017-11-03 19:13:29 +0100
committerArnaldo Carvalho de Melo2017-11-13 13:39:57 +0100
commit640d5175a671cd0df0b9e3b5935dc80fc5248973 (patch)
tree06d8b39b8683da2137cb50a63c85f6af8ba60ae5 /tools/perf/builtin-record.c
parentMerge remote-tracking branch 'torvalds/master' into perf/core (diff)
downloadkernel-qcow2-linux-640d5175a671cd0df0b9e3b5935dc80fc5248973.tar.gz
kernel-qcow2-linux-640d5175a671cd0df0b9e3b5935dc80fc5248973.tar.xz
kernel-qcow2-linux-640d5175a671cd0df0b9e3b5935dc80fc5248973.zip
perf evlist: Set the correct idx when adding dummy events
The evsel->idx field is used mainly to access the right bucket in per-event arrays such as the annotation ones, but also to set evsel->tracking, that in turn will decide what of the events will ask for PERF_RECORD_{MMAP,COMM,EXEC} to be generated, i.e. which perf_event_attr will have its mmap, etc fields set. When we were adding the "dummy" event using perf_evlist__add_dummy() we were not setting it correctly, which could result in multiple tracking events. Now that I'll try using a dummy event to be the tracking one when using 'perf record --delay', i.e. when we process the --delay setting we may already have the evlist set up, like with: perf record -e cycles,instructions --delay 1000 ./workload We will need to add a "dummy" event, then reset evsel->tracking for the first event, "cycles", and set it instead to the dummy one, and also setting its attr.enable_on_exec, so that we get the PERF_RECORD_MMAP, etc metadata events while waiting to enable the explicitely requested events, so lets get this straight and set the right evsel->idx. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Bram Stolk <b.stolk@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-nrdfchshqxf7diszhxcecqb9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-record.c')
0 files changed, 0 insertions, 0 deletions