]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf probe: Replace unacceptable characters when generating event name
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Wed, 13 Nov 2024 00:21:21 +0000 (09:21 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 10 Dec 2024 18:41:10 +0000 (15:41 -0300)
commitb223564fe122cae9183e98c7598381f3b52ce763
tree4229cbfb0566102d30ce6fefcdcdab5d84ab6715
parent690a052a6d85c530363990175d7981dbcdac2301
perf probe: Replace unacceptable characters when generating event name

Replace unacceptable characters with '_' when generating event name from
the probing function name.

This is not for a C program. For the a C program, it will continue to
remove suffixes.

Note that this language checking depends on the debuginfo. So without
the debuginfo, perf probe will always replaces unacceptable characters
with '_'.

For example.

  $ ./perf probe -x cro3 -D \"cro3::cmd::servo::run_show\"
  p:probe_cro3/cro3_cmd_servo_run_show /work/cro3/target/x86_64-unknown-linux-gnu/debug/cro3:0x197530

  $ ./perf probe -x /work/go/example/outyet/main -D 'main.(*Server).poll'
  p:probe_main/main_Server_poll /work/go/example/outyet/main:0x353040

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: Dima Kogan <dima@secretsauce.net>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Link: https://lore.kernel.org/r/173145728160.2747044.18089011235495186810.stgit@mhiramat.roam.corp.google.com
[ Removed some extra tabs in the new struct fields ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/probe-event.c
tools/perf/util/probe-event.h
tools/perf/util/probe-finder.c
tools/perf/util/probe-finder.h