From 94e9ef85c594951f9d9d0e4cd7595e9cd2f792da Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Wed, 5 Aug 2020 19:05:49 +0000 Subject: pmcstat: implement showing offsets into symbols in top mode The -I option (and hotkey) is reused for this. Skipping symbol resolution is moved to the new -A option (and hotkey). While arguably this violates POLA I think it's a change for the better. ALso note the -I option was added in head. Differential Revision: https://reviews.freebsd.org/D21658 --- usr.sbin/pmcstat/pmcstat_log.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'usr.sbin/pmcstat/pmcstat_log.c') diff --git a/usr.sbin/pmcstat/pmcstat_log.c b/usr.sbin/pmcstat/pmcstat_log.c index 5f88d274f393..4f58ffb2eb65 100644 --- a/usr.sbin/pmcstat/pmcstat_log.c +++ b/usr.sbin/pmcstat/pmcstat_log.c @@ -612,6 +612,12 @@ pmcstat_keypress_log(void) c = wgetch(w); wprintw(w, "Key: %c => ", c); switch (c) { + case 'A': + if (args.pa_flags & FLAG_SKIP_TOP_FN_RES) + args.pa_flags &= ~FLAG_SKIP_TOP_FN_RES; + else + args.pa_flags |= FLAG_SKIP_TOP_FN_RES; + break; case 'c': wprintw(w, "enter mode 'd' or 'a' => "); c = wgetch(w); @@ -623,6 +629,12 @@ pmcstat_keypress_log(void) wprintw(w, "switching to accumulation mode"); } break; + case 'I': + if (args.pa_flags & FLAG_SHOW_OFFSET) + args.pa_flags &= ~FLAG_SHOW_OFFSET; + else + args.pa_flags |= FLAG_SHOW_OFFSET; + break; case 'm': pmcstat_mergepmc = !pmcstat_mergepmc; /* -- cgit v1.2.3