aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <[email protected]>2017-12-13 00:05:12 +0900
committerArnaldo Carvalho de Melo <[email protected]>2017-12-27 12:15:55 -0300
commitc588d158124d5b60184fc612e551a19720720d68 (patch)
treebcd19128e2543fa59dd062f6c6f2497ef766cd23 /tools/perf/util/scripting-engines/trace-event-python.c
parent1e9f9e8af0de80e8f6a47d991df66090934be0c6 (diff)
perf probe: Support escaped character in parser
Support the special characters escaped by '\' in parser. This allows user to specify versions directly like below. ===== # ./perf probe -x /lib64/libc-2.25.so malloc_get_state\\@GLIBC_2.2.5 Added new event: probe_libc:malloc_get_state (on malloc_get_state@GLIBC_2.2.5 in /usr/lib64/libc-2.25.so) You can now use it in all perf tools, such as: perf record -e probe_libc:malloc_get_state -aR sleep 1 ===== Or, you can use separators in source filename, e.g. ===== # ./perf probe -x /opt/test/a.out foo+bar.c:3 Semantic error :There is non-digit character in offset. Error: Command Parse Error. ===== Usually "+" in source file cause parser error, but ===== # ./perf probe -x /opt/test/a.out foo\\+bar.c:4 Added new event: probe_a:main (on @foo+bar.c:4 in /opt/test/a.out) You can now use it in all perf tools, such as: perf record -e probe_a:main -aR sleep 1 ===== escaped "\+" allows you to specify that. Signed-off-by: Masami Hiramatsu <[email protected]> Reviewed-by: Thomas Richter <[email protected]> Acked-by: Ravi Bangoria <[email protected]> Cc: Paul Clarke <[email protected]> Cc: bhargavb <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/151309111236.18107.5634753157435343410.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions