]> www.infradead.org Git - users/hch/misc.git/commitdiff
perf annotate: Rename TSR_KIND_POINTER to TSR_KIND_PERCPU_POINTER
authorZecheng Li <zecheng@google.com>
Wed, 17 Sep 2025 19:58:00 +0000 (19:58 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 3 Oct 2025 19:49:51 +0000 (16:49 -0300)
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>
tools/perf/arch/x86/annotate/instructions.c
tools/perf/util/annotate-data.c
tools/perf/util/annotate-data.h

index c6d403eae7441168f666bc89cd54c46f934f3c9e..da98a4e3c52c212e75302705a32c84ea8d37c346 100644 (file)
@@ -301,7 +301,7 @@ static void update_insn_state_x86(struct type_state *state,
                         * as a pointer.
                         */
                        tsr->type = type_die;
-                       tsr->kind = TSR_KIND_POINTER;
+                       tsr->kind = TSR_KIND_PERCPU_POINTER;
                        tsr->ok = true;
 
                        pr_debug_dtp("add [%x] percpu %#"PRIx64" -> reg%d",
@@ -521,7 +521,7 @@ retry:
                }
                /* And then dereference the calculated pointer if it has one */
                else if (has_reg_type(state, sreg) && state->regs[sreg].ok &&
-                        state->regs[sreg].kind == TSR_KIND_POINTER &&
+                        state->regs[sreg].kind == TSR_KIND_PERCPU_POINTER &&
                         die_get_member_type(&state->regs[sreg].type,
                                             src->offset, &type_die)) {
                        tsr->type = type_die;
index 258157cc43c20941d343682a22f3fa427d93fc49..903027a6fb7d3aeebcfc46c2cf5e145496036aa8 100644 (file)
@@ -58,7 +58,7 @@ void pr_debug_type_name(Dwarf_Die *die, enum type_state_kind kind)
        case TSR_KIND_CONST:
                pr_info(" constant\n");
                return;
-       case TSR_KIND_POINTER:
+       case TSR_KIND_PERCPU_POINTER:
                pr_info(" pointer");
                /* it also prints the type info */
                break;
@@ -591,7 +591,7 @@ void set_stack_state(struct type_state_stack *stack, int offset, u8 kind,
        switch (tag) {
        case DW_TAG_structure_type:
        case DW_TAG_union_type:
-               stack->compound = (kind != TSR_KIND_POINTER);
+               stack->compound = (kind != TSR_KIND_PERCPU_POINTER);
                break;
        default:
                stack->compound = false;
@@ -1116,7 +1116,7 @@ again:
                return PERF_TMR_OK;
        }
 
-       if (state->regs[reg].kind == TSR_KIND_POINTER) {
+       if (state->regs[reg].kind == TSR_KIND_PERCPU_POINTER) {
                pr_debug_dtp("percpu ptr");
 
                /*
index 1f76885facb02382b5c1f9db4f16d018c26ec777..df52a0a1f49653fa1bb6a440f7a4294c1991b467 100644 (file)
@@ -34,7 +34,7 @@ enum type_state_kind {
        TSR_KIND_TYPE,
        TSR_KIND_PERCPU_BASE,
        TSR_KIND_CONST,
-       TSR_KIND_POINTER,
+       TSR_KIND_PERCPU_POINTER,
        TSR_KIND_CANARY,
 };