Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trace, tplist, argdist: UDST probe miscellaneous fixes #909

Merged
merged 5 commits into from
Jan 17, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
tplist: Print one-based location and argument indices
The `trace` and `argdist` tools expect location and argument indices
to start at 1 -- the first argument is arg1, and so on. The `tplist`
tool now prints UDST argument indices (and location indices, for
consistency) as 1-based as well.
  • Loading branch information
goldshtn committed Jan 17, 2017
commit 50486ff50fa3e049f4620d47e82db41dde71f815
4 changes: 2 additions & 2 deletions tools/tplist.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ def print_tracepoints():
def print_usdt_argument_details(location):
for idx in xrange(0, location.num_arguments):
arg = location.get_argument(idx)
print(" argument #%d %s" % (idx, arg))
print(" argument #%d %s" % (idx+1, arg))

def print_usdt_details(probe):
if args.verbosity > 0:
print(probe)
if args.verbosity > 1:
for idx in xrange(0, probe.num_locations):
loc = probe.get_location(idx)
print(" location #%d %s" % (idx, loc))
print(" location #%d %s" % (idx+1, loc))
print_usdt_argument_details(loc)
else:
print(" %d location(s)" % probe.num_locations)
Expand Down