summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r--tools/perf/util/annotate.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index a4296fdd9a68..ed1f89d7044e 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -44,8 +44,18 @@ static int jump_ops__parse_target(const char *operands, u64 *target)
return 0;
}
+static int jump_ops__scnprintf(struct ins *ins, char *bf, size_t size,
+ const char *operands, u64 target)
+{
+ if (operands)
+ return scnprintf(bf, size, "%-6.6s %s", ins->name, operands);
+
+ return scnprintf(bf, size, "%-6.6s %" PRIx64, ins->name, target);
+}
+
static struct ins_ops jump_ops = {
.parse_target = jump_ops__parse_target,
+ .scnprintf = jump_ops__scnprintf,
};
bool ins__is_jump(const struct ins *ins)
OpenPOWER on IntegriCloud