Skip to content

Commit a5099d8

Browse files
Zecheng Liacmel
authored andcommitted
perf annotate: Rename TSR_KIND_POINTER to TSR_KIND_PERCPU_POINTER
TSR_KIND_POINTER only represents percpu pointers currently. Rename it to TSR_KIND_PERCPU_POINTER so we can use the TSR_KIND_POINTER to represent pointer to a type. Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Zecheng Li <zecheng@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Xu Liu <xliuprof@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 2cc7aa9 commit a5099d8

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

tools/perf/arch/x86/annotate/instructions.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static void update_insn_state_x86(struct type_state *state,
301301
* as a pointer.
302302
*/
303303
tsr->type = type_die;
304-
tsr->kind = TSR_KIND_POINTER;
304+
tsr->kind = TSR_KIND_PERCPU_POINTER;
305305
tsr->ok = true;
306306

307307
pr_debug_dtp("add [%x] percpu %#"PRIx64" -> reg%d",
@@ -521,7 +521,7 @@ static void update_insn_state_x86(struct type_state *state,
521521
}
522522
/* And then dereference the calculated pointer if it has one */
523523
else if (has_reg_type(state, sreg) && state->regs[sreg].ok &&
524-
state->regs[sreg].kind == TSR_KIND_POINTER &&
524+
state->regs[sreg].kind == TSR_KIND_PERCPU_POINTER &&
525525
die_get_member_type(&state->regs[sreg].type,
526526
src->offset, &type_die)) {
527527
tsr->type = type_die;

tools/perf/util/annotate-data.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void pr_debug_type_name(Dwarf_Die *die, enum type_state_kind kind)
5858
case TSR_KIND_CONST:
5959
pr_info(" constant\n");
6060
return;
61-
case TSR_KIND_POINTER:
61+
case TSR_KIND_PERCPU_POINTER:
6262
pr_info(" pointer");
6363
/* it also prints the type info */
6464
break;
@@ -591,7 +591,7 @@ void set_stack_state(struct type_state_stack *stack, int offset, u8 kind,
591591
switch (tag) {
592592
case DW_TAG_structure_type:
593593
case DW_TAG_union_type:
594-
stack->compound = (kind != TSR_KIND_POINTER);
594+
stack->compound = (kind != TSR_KIND_PERCPU_POINTER);
595595
break;
596596
default:
597597
stack->compound = false;
@@ -1116,7 +1116,7 @@ static enum type_match_result check_matching_type(struct type_state *state,
11161116
return PERF_TMR_OK;
11171117
}
11181118

1119-
if (state->regs[reg].kind == TSR_KIND_POINTER) {
1119+
if (state->regs[reg].kind == TSR_KIND_PERCPU_POINTER) {
11201120
pr_debug_dtp("percpu ptr");
11211121

11221122
/*

tools/perf/util/annotate-data.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ enum type_state_kind {
3434
TSR_KIND_TYPE,
3535
TSR_KIND_PERCPU_BASE,
3636
TSR_KIND_CONST,
37-
TSR_KIND_POINTER,
37+
TSR_KIND_PERCPU_POINTER,
3838
TSR_KIND_CANARY,
3939
};
4040

0 commit comments

Comments
 (0)