diff options
author | fabient <fabient@FreeBSD.org> | 2010-04-02 13:34:28 +0000 |
---|---|---|
committer | fabient <fabient@FreeBSD.org> | 2010-04-02 13:34:28 +0000 |
commit | e8a282c847cf81961f24d89e4a4d2f6116aa0bd9 (patch) | |
tree | 3e7b7bbc739d1bb318576410ce367875ee57df3f /usr.sbin/pmcstat/pmcpl_calltree.c | |
parent | 85d5b2855f1b8db1aa9a2dd7945b711399a111b7 (diff) | |
download | FreeBSD-src-e8a282c847cf81961f24d89e4a4d2f6116aa0bd9.zip FreeBSD-src-e8a282c847cf81961f24d89e4a4d2f6116aa0bd9.tar.gz |
Improve "top" header by:
- Display sample received per PMCs (or merged PMCs).
- Display percentage vs all samples
Diffstat (limited to 'usr.sbin/pmcstat/pmcpl_calltree.c')
-rw-r--r-- | usr.sbin/pmcstat/pmcpl_calltree.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/usr.sbin/pmcstat/pmcpl_calltree.c b/usr.sbin/pmcstat/pmcpl_calltree.c index aac7913..4f62c62 100644 --- a/usr.sbin/pmcstat/pmcpl_calltree.c +++ b/usr.sbin/pmcstat/pmcpl_calltree.c @@ -403,6 +403,10 @@ pmcpl_ct_node_dumptop(int pmcin, struct pmcpl_ct_node *ct, &pmcin, pmcpl_ct_arc_compare); for (i = 0; i < ct->pct_narc; i++) { + /* Skip this arc if there is no sample at all. */ + if (PMCPL_CT_SAMPLE(pmcin, + &ct->pct_arc[i].pcta_samples) == 0) + continue; if (PMCPL_CT_SAMPLEP(pmcin, &ct->pct_arc[i].pcta_samples) > pmcstat_threshold) { if (pmcpl_ct_node_dumptop(pmcin, @@ -516,6 +520,10 @@ pmcpl_ct_topdisplay(void) x = y = 0; for (i = 0; i < pmcpl_ct_root->pct_narc; i++) { + /* Skip this arc if there is no sample at all. */ + if (PMCPL_CT_SAMPLE(pmcin, + &pmcpl_ct_root->pct_arc[i].pcta_samples) == 0) + continue; if (pmcpl_ct_node_dumptop(pmcin, pmcpl_ct_root->pct_arc[i].pcta_child, &rsamples, x, &y, pmcstat_displayheight - 2)) { @@ -693,6 +701,7 @@ pmcpl_ct_process(struct pmcstat_process *pp, struct pmcstat_pmcrecord *pmcr, } if (n-- == 0) { pmcstat_stats.ps_callchain_dubious_frames++; + pmcr->pr_dubious_frames++; return; } |