diff options
author | Ruslan Bukin <br@FreeBSD.org> | 2017-10-24 16:28:00 +0000 |
---|---|---|
committer | Ruslan Bukin <br@FreeBSD.org> | 2017-10-24 16:28:00 +0000 |
commit | d27927f731d6877267b0db84664776d2e62fc443 (patch) | |
tree | cd3aca85950d07a00423da65d47330205feed92c /usr.sbin/pmcstat/pmcpl_calltree.c | |
parent | 701492a5f6733530ace7c6af70a753bb6c8c4120 (diff) |
Extract a set of pmcstat functions and interfaces to the new internal
library -- libpmcstat.
This includes PMC logging module, symbols lookup functions,
ELF parsing, process management, PMC attachment, etc.
This allows to reuse code while building new hwpmc(4)-based applications.
Also add pmcstat_symbol_search_by_name() function that allows to find
mapped IP range for a given function name.
Reviewed by: kib
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D12718
Notes
Notes:
svn path=/head/; revision=324959
Diffstat (limited to 'usr.sbin/pmcstat/pmcpl_calltree.c')
-rw-r--r-- | usr.sbin/pmcstat/pmcpl_calltree.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/pmcstat/pmcpl_calltree.c b/usr.sbin/pmcstat/pmcpl_calltree.c index 0f95ac172668..be03f3e8bc00 100644 --- a/usr.sbin/pmcstat/pmcpl_calltree.c +++ b/usr.sbin/pmcstat/pmcpl_calltree.c @@ -58,6 +58,9 @@ __FBSDID("$FreeBSD$"); #include "pmcstat_top.h" #include "pmcpl_calltree.h" +#define min(A,B) ((A) < (B) ? (A) : (B)) +#define max(A,B) ((A) > (B) ? (A) : (B)) + #define PMCPL_CT_GROWSIZE 4 static int pmcstat_skiplink = 0; @@ -581,8 +584,11 @@ pmcpl_ct_topdisplay(void) */ int -pmcpl_ct_topkeypress(int c, WINDOW *w) +pmcpl_ct_topkeypress(int c, void *arg) { + WINDOW *w; + + w = (WINDOW *)arg; switch (c) { case 'f': |