summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-c2c.c
diff options
context:
space:
mode:
authorTianyou Li <tianyou.li@intel.com>2025-10-13 22:48:11 +0800
committerNamhyung Kim <namhyung@kernel.org>2025-10-19 12:50:07 +0900
commitad83f3b7155db28e82de24dbaa1af2b8f5d972a3 (patch)
tree3081bbb11c819a9b2d86eca3779f01e557d83e3c /tools/perf/builtin-c2c.c
parentcd3466cd2639783da563253f1f9e3fb2ba936317 (diff)
perf c2c annotate: Start from the contention line
Add support to highlight the contention line in the annotate browser, use 'TAB'/'UNTAB' to refocus to the contention line. Signed-off-by: Tianyou Li <tianyou.li@intel.com> Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Reviewed-by: Thomas Falcon <thomas.falcon@intel.com> Reviewed-by: Jiebin Sun <jiebin.sun@intel.com> Reviewed-by: Pan Deng <pan.deng@intel.com> Reviewed-by: Zhiguo Zhou <zhiguo.zhou@intel.com> Reviewed-by: Wangyang Guo <wangyang.guo@intel.com> Tested-by: Ravi Bangoria <ravi.bangoria@amd.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/builtin-c2c.c')
-rw-r--r--tools/perf/builtin-c2c.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index a37e886ff3d7..14c3823f8fed 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -2604,6 +2604,7 @@ static int perf_c2c__toggle_annotation(struct hist_browser *browser)
struct symbol *sym = NULL;
struct annotated_source *src = NULL;
struct c2c_hist_entry *c2c_he = NULL;
+ u64 al_addr = NO_ADDR;
if (!perf_c2c__has_annotation(he->hists->hpp_list)) {
ui_browser__help_window(&browser->b, "No annotation support");
@@ -2627,8 +2628,11 @@ static int perf_c2c__toggle_annotation(struct hist_browser *browser)
return 0;
}
+ if (he->mem_info)
+ al_addr = mem_info__iaddr(he->mem_info)->al_addr;
+
c2c_he = container_of(he, struct c2c_hist_entry, he);
- return hist_entry__tui_annotate(he, c2c_he->evsel, NULL);
+ return hist_entry__tui_annotate(he, c2c_he->evsel, NULL, al_addr);
}
static void c2c_browser__update_nr_entries(struct hist_browser *hb)