From: Sasha Goldshtein Date: Mon, 16 Jan 2017 18:36:52 +0000 (+0000) Subject: tplist: Print one-based location and argument indices X-Git-Tag: v0.3.0~73^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50486ff50fa3e049f4620d47e82db41dde71f815;p=platform%2Fupstream%2Fbcc.git 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. --- diff --git a/tools/tplist.py b/tools/tplist.py index 627f20e..c7656a6 100755 --- a/tools/tplist.py +++ b/tools/tplist.py @@ -68,7 +68,7 @@ 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: @@ -76,7 +76,7 @@ def print_usdt_details(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)