Skip to content

Commit

Permalink
trace: Print USDT arg helpers in verbose mode (iovisor#723)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
goldshtn authored and 4ast committed Oct 4, 2016
1 parent ec67971 commit f733cac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,8 @@ def _attach_probes(self):
# uprobe is being attached.
probe.usdt.enable_probe(
probe.usdt_name, probe.probe_name)
if self.args.verbose:
print(probe.usdt.get_text())
usdt_contexts.append(probe.usdt)
self.bpf = BPF(text=self.program, usdt_contexts=usdt_contexts)
Tracepoint.attach(self.bpf)
Expand Down

0 comments on commit f733cac

Please sign in to comment.