Skip to content

Commit 632003f

Browse files
committed
perf hists browser: Generalize the do_zoom_dso() function
We'll use it to provide a top level hotkey to zoom into the kernel dso directly. Reviewed-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: Kan Liang <kan.liang@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-ae9cjel6v05wjnz9r6z77b6x@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent bdc633f commit 632003f

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎tools/perf/ui/browsers/hists.c‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2530,11 +2530,8 @@ add_thread_opt(struct hist_browser *browser, struct popup_action *act,
25302530
return 1;
25312531
}
25322532

2533-
static int
2534-
do_zoom_dso(struct hist_browser *browser, struct popup_action *act)
2533+
static int hists_browser__zoom_map(struct hist_browser *browser, struct map *map)
25352534
{
2536-
struct map *map = act->ms.map;
2537-
25382535
if (!hists__has(browser->hists, dso) || map == NULL)
25392536
return 0;
25402537

@@ -2556,6 +2553,12 @@ do_zoom_dso(struct hist_browser *browser, struct popup_action *act)
25562553
return 0;
25572554
}
25582555

2556+
static int
2557+
do_zoom_dso(struct hist_browser *browser, struct popup_action *act)
2558+
{
2559+
return hists_browser__zoom_map(browser, act->ms.map);
2560+
}
2561+
25592562
static int
25602563
add_dso_opt(struct hist_browser *browser, struct popup_action *act,
25612564
char **optstr, struct map *map)

0 commit comments

Comments
 (0)