diff options
author | Steven Rostedt (Google) <[email protected]> | 2022-12-19 13:31:07 -0500 |
---|---|---|
committer | Steven Rostedt (Google) <[email protected]> | 2023-01-25 10:31:11 -0500 |
commit | e6745a4da964f5f49b21cbcce5125456984ddc6b (patch) | |
tree | 06ffa744498e7ece4d553fbfc3762a042db8a200 /tools/testing/selftests/bpf/progs/test_prog_array_init.c | |
parent | ae3edea88e6c1bbb8b41ef958f79a7a44ab45f7c (diff) |
tracing: Add a way to filter function addresses to function names
There's been several times where an event records a function address in
its field and I needed to filter on that address for a specific function
name. It required looking up the function in kallsyms, finding its size,
and doing a compare of "field >= function_start && field < function_end".
But this would change from boot to boot and is unreliable in scripts.
Also, it is useful to have this at boot up, where the addresses will not
be known. For example, on the boot command line:
trace_trigger="initcall_finish.traceoff if func.function == acpi_init"
To implement this, add a ".function" prefix, that will check that the
field is of size long, and the only operations allowed (so far) are "=="
and "!=".
Link: https://lkml.kernel.org/r/[email protected]
Cc: Masami Hiramatsu <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Tom Zanussi <[email protected]>
Cc: Zheng Yejian <[email protected]>
Reviewed-by: Ross Zwisler <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_prog_array_init.c')
0 files changed, 0 insertions, 0 deletions