diff --git a/src/gallium/tools/trace/model.py b/src/gallium/tools/trace/model.py index 6a338b53012..aedad1218f4 100755 --- a/src/gallium/tools/trace/model.py +++ b/src/gallium/tools/trace/model.py @@ -228,22 +228,26 @@ class PrettyPrinter: def visit_call(self, node): if not self.options.suppress_variants: self.formatter.text('%s ' % node.no) + if node.klass is not None: self.formatter.function(node.klass + '::' + node.method) else: self.formatter.function(node.method) - self.formatter.text('(') - sep = '' - for name, value in node.args: - self.formatter.text(sep) - self.formatter.variable(name) - self.formatter.text(' = ') - value.visit(self) - sep = ', ' - self.formatter.text(')') - if node.ret is not None: - self.formatter.text(' = ') - node.ret.visit(self) + + if not self.options.method_only: + self.formatter.text('(') + sep = '' + for name, value in node.args: + self.formatter.text(sep) + self.formatter.variable(name) + self.formatter.text(' = ') + value.visit(self) + sep = ', ' + self.formatter.text(')') + if node.ret is not None: + self.formatter.text(' = ') + node.ret.visit(self) + if not self.options.suppress_variants and node.time is not None: self.formatter.text(' // time ') node.time.visit(self) diff --git a/src/gallium/tools/trace/parse.py b/src/gallium/tools/trace/parse.py index ae5e34e7fbb..cbf6896f9df 100755 --- a/src/gallium/tools/trace/parse.py +++ b/src/gallium/tools/trace/parse.py @@ -424,6 +424,9 @@ class Main: optparser.add_argument("-N", "--named", action="store_const", const=True, default=False, dest="named_ptrs", help="generate symbolic names for raw pointer values") + optparser.add_argument("-M", "--method-only", + action="store_const", const=True, default=False, + dest="method_only", help="output only call names without arguments") return optparser diff --git a/src/gallium/tools/trace/tracediff.sh b/src/gallium/tools/trace/tracediff.sh index f5c8ae39db3..908e9e2afdb 100755 --- a/src/gallium/tools/trace/tracediff.sh +++ b/src/gallium/tools/trace/tracediff.sh @@ -58,6 +58,7 @@ print_help() echo "" echo "dump.py options:" echo " -N, --named generate symbolic names for raw pointer values" + echo " -M, --method-only output only call names without arguments" echo "" echo "sdiff options:" echo " -d, --minimal try hard to find a smaller set of changes" @@ -109,7 +110,7 @@ do print_help exit 0 ;; - -N|--named) + -N|--named|-M|--method-only) DUMP_ARGS+=("$1") shift ;;