summaryrefslogtreecommitdiffstats
path: root/scripts/coccinelle
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2015-08-18 12:07:05 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-09-02 17:46:26 -0300
commit53ff6bc37be449f546158a39c528d7814dfb15a1 (patch)
tree88307bdcec159241751bb621049ed9a3bf928560 /scripts/coccinelle
parent5ad4da4302712fba10624d28cb6c269fee592b69 (diff)
downloadlinux-53ff6bc37be449f546158a39c528d7814dfb15a1.tar.gz
linux-53ff6bc37be449f546158a39c528d7814dfb15a1.tar.bz2
linux-53ff6bc37be449f546158a39c528d7814dfb15a1.zip
perf tools: Fix use of wrong event when processing exit events
In a couple of cases the 'comm' member of 'union event' has been used instead of the correct member ('fork') when processing exit events. In the cases where it has been used incorrectly, only the 'pid' and 'tid' are affected. The 'pid' value would be correct anyway because it is in the same position in 'comm' and 'fork' events, but the 'tid' would have been incorrectly assigned from 'ppid'. However, for exit events, the kernel puts the current task in the 'ppid' and 'ttid' which is the same as the exiting task. That is 'ppid' == 'pid' and if the task is not multi-threaded, 'pid' == 'tid' i.e. the data goes wrong only when tracing multi-threaded programs. It is hard to find an example of how this would produce an error in practice. There are 3 occurences of the fix: 1. perf script is only affected if !sample_id_all which only happens on old kernels. 2. intel_pt is only affected when decoding without timestamps and would probably still decode correctly - the exit event is only used to flush out data which anyway gets flushed at the end of the session 3. intel_bts also uses the exit event to flush data which would probably not cause errors as it would get flushed at the end of the session instead Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/1439888825-27708-1-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'scripts/coccinelle')
0 files changed, 0 insertions, 0 deletions