From 823bd2f0657c7e1ea8c0702b0a45b81c7d46e91c Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 7 May 2012 18:57:02 -0300 Subject: [PATCH] --- yaml --- r: 304875 b: refs/heads/master c: b9818e93759c30c8942391f4f5fadaa36659ee33 h: refs/heads/master i: 304873: ddff58e46e58396b61458f4c9fb00db09661c7c1 304871: 9d3e2d1e9433f14e471c799c2f556371a0dd2883 v: v3 --- [refs] | 2 +- trunk/tools/perf/util/annotate.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 3d68407da590..b2f622c18850 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5417072bf6b17eaa31f21f12906f381f148b5200 +refs/heads/master: b9818e93759c30c8942391f4f5fadaa36659ee33 diff --git a/trunk/tools/perf/util/annotate.c b/trunk/tools/perf/util/annotate.c index 0905db4390c1..6b4146b40a20 100644 --- a/trunk/tools/perf/util/annotate.c +++ b/trunk/tools/perf/util/annotate.c @@ -113,6 +113,16 @@ bool ins__is_jump(const struct ins *ins) return ins->ops == &jump_ops; } +static int nop__scnprintf(struct ins *ins __used, char *bf, size_t size, + struct ins_operands *ops __used) +{ + return scnprintf(bf, size, "%-6.6s", "nop"); +} + +static struct ins_ops nop_ops = { + .scnprintf = nop__scnprintf, +}; + /* * Must be sorted by name! */ @@ -154,6 +164,9 @@ static struct ins instructions[] = { { .name = "jrcxz", .ops = &jump_ops, }, { .name = "js", .ops = &jump_ops, }, { .name = "jz", .ops = &jump_ops, }, + { .name = "nop", .ops = &nop_ops, }, + { .name = "nopl", .ops = &nop_ops, }, + { .name = "nopw", .ops = &nop_ops, }, }; static int ins__cmp(const void *name, const void *insp)