Commit f733cacf authored by Sasha Goldshtein's avatar Sasha Goldshtein Committed by 4ast

trace: Print USDT arg helpers in verbose mode (#723)

When verbose mode is enabled, ask all USDT helper
objects to print out the argument helper functions,
which help retrieve the argument values for each
individual probe location. This can be useful for
debugging probes; the helper functions are part of
the loaded BPF program, so they need to be printed
in verbose mode.
parent ec679711
...@@ -576,6 +576,8 @@ trace 'u:pthread:pthread_create (arg4 != 0)' ...@@ -576,6 +576,8 @@ trace 'u:pthread:pthread_create (arg4 != 0)'
# uprobe is being attached. # uprobe is being attached.
probe.usdt.enable_probe( probe.usdt.enable_probe(
probe.usdt_name, probe.probe_name) probe.usdt_name, probe.probe_name)
if self.args.verbose:
print(probe.usdt.get_text())
usdt_contexts.append(probe.usdt) usdt_contexts.append(probe.usdt)
self.bpf = BPF(text=self.program, usdt_contexts=usdt_contexts) self.bpf = BPF(text=self.program, usdt_contexts=usdt_contexts)
Tracepoint.attach(self.bpf) Tracepoint.attach(self.bpf)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment