]> Git Repo - linux.git/commit
perf probe: Fix short file name probe location reporting
authorFranck Bui-Huu <[email protected]>
Thu, 23 Dec 2010 15:04:23 +0000 (16:04 +0100)
committerArnaldo Carvalho de Melo <[email protected]>
Mon, 27 Dec 2010 21:48:21 +0000 (19:48 -0200)
commit32ae2ade462146729580117d9886cc9efd83dfbe
tree5fe588212404ceb31ca829c275030104e7346b76
parentce0ac9e1851364fa67c991659ce1db05ab82c6ae
perf probe: Fix short file name probe location reporting

After adding probes, perf-probe(1) reports the probes locations which include
filenames for certain cases.

But for short file names (whose length < 32), perf-probe didn't display the
name correctly. It actually skipped the first character.

Here's an example where 'icmp.c' was screwed:

   $ perf probe -n -a "icmp.c;sk=*"
   Add new events:
     probe:icmp_push_reply (on @cmp.c)
     probe:icmp_reply     (on @cmp.c)
     probe:icmp_reply_1   (on @cmp.c)
     probe:icmp_send      (on @cmp.c)
     probe:icmp_send_1    (on @cmp.c)
     probe:icmp_error     (on @cmp.c)
     probe:icmp_error_1   (on @cmp.c)
     probe:icmp_error_2   (on @cmp.c)
     probe:icmp_error_3   (on @cmp.c)

This patch fixes this bug in synthesize_perf_probe_point().

Acked-by: Masami Hiramatsu <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Franck Bui-Huu <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/probe-event.c
This page took 0.052598 seconds and 4 git commands to generate.