path: root/tools/perf/bench/futex-requeue.c
diff options
authorHe Kuang <>2015-04-25 16:08:58 +0800
committerArnaldo Carvalho de Melo <>2015-04-27 13:57:29 -0300
commitd13855ef18e1852b2c4dc86ddf5759c5b34628cb (patch)
tree1bb1925c206aa7111c41bda43c34bd3cd51ce9e3 /tools/perf/bench/futex-requeue.c
parentc671835021798c1c40ca0b55b49feff76ed5e0e1 (diff)
perf probe: Fix bug with global variables handling
There are missing curly braces which causes find_variable() return wrong value when probing with global variables. This problem can be reproduced as following: $ perf probe -v --add='generic_perform_write global_variable_for_test' ... Try to find probe point from debuginfo. Probe point found: generic_perform_write+0 Searching 'global_variable_for_test' variable in context. An error occurred in debuginfo analysis (-2). Error: Failed to add events. Reason: No such file or directory (Code: -2) After this patch: $ perf probe -v --add='generic_perform_write global_variable_for_test' ... Converting variable global_variable_for_test into trace event. global_variable_for_test type is int. Found 1 probe_trace_events. Opening /sys/kernel/debug/tracing/kprobe_events write=1 Added new event: Writing event: p:probe/generic_perform_write _stext+1237464 global_variable_for_test=@global_variable_for_test+0:s32 probe:generic_perform_write (on generic_perform_write with global_variable_for_test) You can now use it in all perf tools, such as: perf record -e probe:generic_perform_write -aR sleep 1 Signed-off-by: He Kuang <> Acked-by: Masami Hiramatsu <> Cc: Paul Mackerras <> Cc: Peter Zijlstra <> Cc: Wang Nan <> Link: Signed-off-by: Arnaldo Carvalho de Melo <>
Diffstat (limited to 'tools/perf/bench/futex-requeue.c')
0 files changed, 0 insertions, 0 deletions