diff options
Diffstat (limited to 'tools/perf/util/annotate.c')
| -rw-r--r-- | tools/perf/util/annotate.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index aa66791b1bfc..da1c4c4a0dd8 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c | |||
| @@ -49,10 +49,9 @@ struct arch { | |||
| 49 | void *priv; | 49 | void *priv; |
| 50 | unsigned int model; | 50 | unsigned int model; |
| 51 | unsigned int family; | 51 | unsigned int family; |
| 52 | int (*init)(struct arch *arch); | 52 | int (*init)(struct arch *arch, char *cpuid); |
| 53 | bool (*ins_is_fused)(struct arch *arch, const char *ins1, | 53 | bool (*ins_is_fused)(struct arch *arch, const char *ins1, |
| 54 | const char *ins2); | 54 | const char *ins2); |
| 55 | int (*cpuid_parse)(struct arch *arch, char *cpuid); | ||
| 56 | struct { | 55 | struct { |
| 57 | char comment_char; | 56 | char comment_char; |
| 58 | char skip_functions_char; | 57 | char skip_functions_char; |
| @@ -132,10 +131,10 @@ static struct arch architectures[] = { | |||
| 132 | }, | 131 | }, |
| 133 | { | 132 | { |
| 134 | .name = "x86", | 133 | .name = "x86", |
| 134 | .init = x86__annotate_init, | ||
| 135 | .instructions = x86__instructions, | 135 | .instructions = x86__instructions, |
| 136 | .nr_instructions = ARRAY_SIZE(x86__instructions), | 136 | .nr_instructions = ARRAY_SIZE(x86__instructions), |
| 137 | .ins_is_fused = x86__ins_is_fused, | 137 | .ins_is_fused = x86__ins_is_fused, |
| 138 | .cpuid_parse = x86__cpuid_parse, | ||
| 139 | .objdump = { | 138 | .objdump = { |
| 140 | .comment_char = '#', | 139 | .comment_char = '#', |
| 141 | }, | 140 | }, |
| @@ -1457,16 +1456,13 @@ int symbol__disassemble(struct symbol *sym, struct map *map, | |||
| 1457 | *parch = arch; | 1456 | *parch = arch; |
| 1458 | 1457 | ||
| 1459 | if (arch->init) { | 1458 | if (arch->init) { |
| 1460 | err = arch->init(arch); | 1459 | err = arch->init(arch, cpuid); |
| 1461 | if (err) { | 1460 | if (err) { |
| 1462 | pr_err("%s: failed to initialize %s arch priv area\n", __func__, arch->name); | 1461 | pr_err("%s: failed to initialize %s arch priv area\n", __func__, arch->name); |
| 1463 | return err; | 1462 | return err; |
| 1464 | } | 1463 | } |
| 1465 | } | 1464 | } |
| 1466 | 1465 | ||
| 1467 | if (arch->cpuid_parse && cpuid) | ||
| 1468 | arch->cpuid_parse(arch, cpuid); | ||
| 1469 | |||
| 1470 | pr_debug("%s: filename=%s, sym=%s, start=%#" PRIx64 ", end=%#" PRIx64 "\n", __func__, | 1466 | pr_debug("%s: filename=%s, sym=%s, start=%#" PRIx64 ", end=%#" PRIx64 "\n", __func__, |
| 1471 | symfs_filename, sym->name, map->unmap_ip(map, sym->start), | 1467 | symfs_filename, sym->name, map->unmap_ip(map, sym->start), |
| 1472 | map->unmap_ip(map, sym->end)); | 1468 | map->unmap_ip(map, sym->end)); |
