Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Zecheng Li and committed by
Arnaldo Carvalho de Melo
a5099d81 2cc7aa99

+6 -6
+2 -2
tools/perf/arch/x86/annotate/instructions.c
··· 301 301 * as a pointer. 302 302 */ 303 303 tsr->type = type_die; 304 - tsr->kind = TSR_KIND_POINTER; 304 + tsr->kind = TSR_KIND_PERCPU_POINTER; 305 305 tsr->ok = true; 306 306 307 307 pr_debug_dtp("add [%x] percpu %#"PRIx64" -> reg%d", ··· 521 521 } 522 522 /* And then dereference the calculated pointer if it has one */ 523 523 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 && 525 525 die_get_member_type(&state->regs[sreg].type, 526 526 src->offset, &type_die)) { 527 527 tsr->type = type_die;
+3 -3
tools/perf/util/annotate-data.c
··· 58 58 case TSR_KIND_CONST: 59 59 pr_info(" constant\n"); 60 60 return; 61 - case TSR_KIND_POINTER: 61 + case TSR_KIND_PERCPU_POINTER: 62 62 pr_info(" pointer"); 63 63 /* it also prints the type info */ 64 64 break; ··· 591 591 switch (tag) { 592 592 case DW_TAG_structure_type: 593 593 case DW_TAG_union_type: 594 - stack->compound = (kind != TSR_KIND_POINTER); 594 + stack->compound = (kind != TSR_KIND_PERCPU_POINTER); 595 595 break; 596 596 default: 597 597 stack->compound = false; ··· 1116 1116 return PERF_TMR_OK; 1117 1117 } 1118 1118 1119 - if (state->regs[reg].kind == TSR_KIND_POINTER) { 1119 + if (state->regs[reg].kind == TSR_KIND_PERCPU_POINTER) { 1120 1120 pr_debug_dtp("percpu ptr"); 1121 1121 1122 1122 /*
+1 -1
tools/perf/util/annotate-data.h
··· 34 34 TSR_KIND_TYPE, 35 35 TSR_KIND_PERCPU_BASE, 36 36 TSR_KIND_CONST, 37 - TSR_KIND_POINTER, 37 + TSR_KIND_PERCPU_POINTER, 38 38 TSR_KIND_CANARY, 39 39 }; 40 40