diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-03-20 17:46:53 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-03-21 14:53:36 -0300 |
commit | f208bd8df08d0659ecd9e09e992c79aab26cddfa (patch) | |
tree | 94c8bff840892df70218232788a397c754e45249 /security | |
parent | e6c76d620379fd65fc0310aee1785ff7b1b10236 (diff) | |
download | lwn-f208bd8df08d0659ecd9e09e992c79aab26cddfa.tar.gz lwn-f208bd8df08d0659ecd9e09e992c79aab26cddfa.zip |
perf trace: Handle legacy syscalls tracepoints
Currently the code skips the first field with the expectation that it is 'nr'.
But older kernels do not have the 'nr' field:
field:int nr; offset:8; size:4; signed:1;
Change perf-trace to drop the field if it exists after parsing the format file.
This fixes the off-by-one problem with older kernels (e.g., RHEL6). e.g,
perf-trace shows this for write:
1.515 ( 0.006 ms): dd/4245 write(buf: 2</dev/pts/0>, count: 140733837536224 ) = 26
where 2 is really the fd, the huge number is really the buf address, etc. With
this patch you get the more appropriate:
1.813 ( 0.003 ms): dd/6330 write(fd: 2</dev/pts/0>, buf: 0x7fff22fc81f0, count: 25) = 25
Based-on-a-patch-by: David Ahern <dsahern@gmail.com>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-gvpdave4u2yq2jnzbcdznpvf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions