perf annotate: Handle "decq", "incq", "testq", "tzcnt" instructions on x86
authorNamhyung Kim <namhyung@kernel.org>
Thu, 11 May 2023 06:27:23 +0000 (23:27 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 15 May 2023 20:50:01 +0000 (17:50 -0300)
I found that the "decq", "incq", "testq", "tzcnt" instructions didn't
parse the operands properly.  Add them to the "x86__instructions" table
to fix the issue.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230511062725.514752-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/x86/annotate/instructions.c

index 3058726..5c7bec2 100644 (file)
@@ -35,12 +35,14 @@ static struct ins x86__instructions[] = {
        { .name = "cs",         .ops = &mov_ops,  },
        { .name = "dec",        .ops = &dec_ops,  },
        { .name = "decl",       .ops = &dec_ops,  },
+       { .name = "decq",       .ops = &dec_ops,  },
        { .name = "divsd",      .ops = &mov_ops,  },
        { .name = "divss",      .ops = &mov_ops,  },
        { .name = "gs",         .ops = &mov_ops,  },
        { .name = "imul",       .ops = &mov_ops,  },
        { .name = "inc",        .ops = &dec_ops,  },
        { .name = "incl",       .ops = &dec_ops,  },
+       { .name = "incq",       .ops = &dec_ops,  },
        { .name = "ja",         .ops = &jump_ops, },
        { .name = "jae",        .ops = &jump_ops, },
        { .name = "jb",         .ops = &jump_ops, },
@@ -123,6 +125,8 @@ static struct ins x86__instructions[] = {
        { .name = "test",       .ops = &mov_ops,  },
        { .name = "testb",      .ops = &mov_ops,  },
        { .name = "testl",      .ops = &mov_ops,  },
+       { .name = "testq",      .ops = &mov_ops,  },
+       { .name = "tzcnt",      .ops = &mov_ops,  },
        { .name = "ucomisd",    .ops = &mov_ops,  },
        { .name = "ucomiss",    .ops = &mov_ops,  },
        { .name = "vaddsd",     .ops = &mov_ops,  },