[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <660c8ba1-635b-4acc-8824-d195f1b133a0@amd.com>
Date: Mon, 13 Oct 2025 14:22:45 +0530
From: Ravi Bangoria <ravi.bangoria@....com>
To: Tianyou Li <tianyou.li@...el.com>, Namhyung Kim <namhyung@...nel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>
CC: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>, Alexander Shishkin
<alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>, "Ian
Rogers" <irogers@...gle.com>, Adrian Hunter <adrian.hunter@...el.com>, "Kan
Liang" <kan.liang@...ux.intel.com>, <wangyang.guo@...el.com>,
<pan.deng@...el.com>, <zhiguo.zhou@...el.com>, <jiebin.sun@...el.com>,
<thomas.falcon@...el.com>, <dapeng1.mi@...el.com>,
<linux-perf-users@...r.kernel.org>, <linux-kernel@...r.kernel.org>, "Ravi
Bangoria" <ravi.bangoria@....com>
Subject: Re: [PATCH v7 1/2] perf tools c2c: Add annotation support to perf c2c
report
On 11-Oct-25 1:46 PM, Tianyou Li wrote:
> Perf c2c report currently specified the code address and source:line
> information in the cacheline browser, while it is lack of annotation
> support like perf report to directly show the disassembly code for
> the particular symbol shared that same cacheline. This patches add
> a key 'a' binding to the cacheline browser which reuse the annotation
> browser to show the disassembly view for easier analysis of cacheline
> contentions.
I still see annotate browser title with samples/event count as 0.
Something like below (lightly tested) should fix it. Can you please
check?
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -299,6 +299,18 @@ static bool perf_c2c__has_annotation(struct perf_hpp_list *list)
return !list || list->sym;
}
+static void perf_c2c__evsel_hists_inc_stats(struct evsel *evsel,
+ struct hist_entry *he,
+ struct perf_sample *sample)
+{
+ struct hists *evsel_hists = evsel__hists(evsel);
+
+ hists__inc_nr_samples(evsel_hists, he->filtered);
+ evsel_hists->stats.total_period += sample->period;
+ if (!he->filtered)
+ evsel_hists->stats.total_non_filtered_period += sample->period;
+}
+
static int process_sample_event(const struct perf_tool *tool __maybe_unused,
union perf_event *event,
struct perf_sample *sample,
@@ -363,6 +375,9 @@ static int process_sample_event(const struct perf_tool *tool __maybe_unused,
hists__inc_nr_samples(&c2c_hists->hists, he->filtered);
if (perf_c2c__has_annotation(NULL))
addr_map_symbol__inc_samples(mem_info__iaddr(mi), sample, evsel);
+
+ perf_c2c__evsel_hists_inc_stats(evsel, he, sample);
+
ret = hist_entry__append_callchain(he, sample);
if (!ret) {
Thanks,
Ravi
Powered by blists - more mailing lists