All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zecheng Li <zecheng@google.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	 Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	 Mark Rutland <mark.rutland@arm.com>,
	 Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,  Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	 "Liang, Kan" <kan.liang@linux.intel.com>,
	Masami Hiramatsu <mhiramat@kernel.org>
Cc: Zecheng Li <zli94@ncsu.edu>, Xu Liu <xliuprof@google.com>,
	 linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Zecheng Li <zecheng@google.com>
Subject: [PATCH v1 0/6] perf tools: Some improvements on data type profiler
Date: Fri, 25 Jul 2025 20:28:03 +0000	[thread overview]
Message-ID: <20250725202809.1230085-1-zecheng@google.com> (raw)

Hi all,

I've identified several missing data type annotations within the perf
tools when annotating the Linux kernel. This patch series improves the
coverage and correctness of data type annotations.

Here's a breakdown of the changes:

Patches 1 and 2 fixes direct type matching from DWARF. They fix cases
with intrusive linked lists (e.g, sched_balance_update_blocked_averages)
where type information was previously missed.

Patch 3 utilizes this to better determine the types of stack
variables for instruction tracking.

Patch 4 skips annotations for lea instructions, as these do not involve
memory access.

Patches 5 and 6 implement a basic idea for register offset tracking
based on arithmetic operations. While this feature has known limitations
and may regress in rare cases compared to the original, it generally
improves offset tracking in most scenarios.

Note: I will be communicating from a new email address, zli94@ncsu.edu,
as I will soon lose access to my current email account.

Thanks,
Zecheng

Zecheng Li (6):
  perf dwarf-aux: Use signed comparison in match_var_offset
  perf dwarf-aux: More accurate variable type match for breg
  perf dwarf-aux: Better type matching for stack variables
  perf annotate: Skip annotating data types to lea instructions
  perf dwarf-aux: Find pointer type to a type
  perf annotate: Track arithmetic instructions on pointers

 tools/perf/arch/x86/annotate/instructions.c | 109 ++++++++++++++++-
 tools/perf/util/annotate-data.c             |  14 ++-
 tools/perf/util/annotate-data.h             |   6 +
 tools/perf/util/annotate.c                  |   5 +
 tools/perf/util/dwarf-aux.c                 | 125 ++++++++++++++++++--
 tools/perf/util/dwarf-aux.h                 |   4 +
 6 files changed, 247 insertions(+), 16 deletions(-)

-- 
2.50.1.470.g6ba607880d-goog


             reply	other threads:[~2025-07-25 20:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-25 20:28 Zecheng Li [this message]
2025-07-25 20:28 ` [PATCH v1 1/6] perf dwarf-aux: Use signed comparison in match_var_offset Zecheng Li
2025-07-26  0:58   ` Ian Rogers
2025-07-26 23:56     ` Namhyung Kim
2025-07-25 20:28 ` [PATCH v1 2/6] perf dwarf-aux: More accurate variable type match for breg Zecheng Li
2025-07-27  0:14   ` Namhyung Kim
2025-07-25 20:28 ` [PATCH v1 3/6] perf dwarf-aux: Better type matching for stack variables Zecheng Li
2025-07-26  1:17   ` Ian Rogers
2025-07-27  0:22     ` Namhyung Kim
2025-07-25 20:28 ` [PATCH v1 4/6] perf annotate: Skip annotating data types to lea instructions Zecheng Li
2025-07-26  1:19   ` Ian Rogers
2025-07-25 20:28 ` [PATCH v1 5/6] perf dwarf-aux: Find pointer type to a type Zecheng Li
2025-07-27  0:24   ` Namhyung Kim
2025-07-25 20:28 ` [PATCH v1 6/6] perf annotate: Track arithmetic instructions on pointers Zecheng Li
2025-07-27  0:32   ` Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250725202809.1230085-1-zecheng@google.com \
    --to=zecheng@google.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=xliuprof@google.com \
    --cc=zli94@ncsu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.