diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2020-08-05 19:05:49 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2020-08-05 19:05:49 +0000 |
commit | 94e9ef85c594951f9d9d0e4cd7595e9cd2f792da (patch) | |
tree | aa11a6f0efd70efc1ad0ae0b867c8fb17725a695 /usr.sbin/pmcstat/pmcstat_log.c | |
parent | 5414a8285faa844f925159b890c676c25f8a8c1c (diff) | |
download | src-test2-94e9ef85c594951f9d9d0e4cd7595e9cd2f792da.tar.gz src-test2-94e9ef85c594951f9d9d0e4cd7595e9cd2f792da.zip |
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
Notes
Notes:
svn path=/head/; revision=363928
Diffstat (limited to 'usr.sbin/pmcstat/pmcstat_log.c')
-rw-r--r-- | usr.sbin/pmcstat/pmcstat_log.c | 12 |
1 files changed, 12 insertions, 0 deletions
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; /* |