diff options
author | fabient <fabient@FreeBSD.org> | 2010-04-21 11:50:13 +0000 |
---|---|---|
committer | fabient <fabient@FreeBSD.org> | 2010-04-21 11:50:13 +0000 |
commit | 6f1324bb0a4d4c8e22205a9331f68d4dd8659d10 (patch) | |
tree | 1827db3250ce128931a4a9093dd1cd3d16a0ab48 /usr.sbin/pmcstat/pmcpl_calltree.c | |
parent | e38e667d9159052b6124fe45e409f2ed91fbc409 (diff) | |
download | FreeBSD-src-6f1324bb0a4d4c8e22205a9331f68d4dd8659d10.zip FreeBSD-src-6f1324bb0a4d4c8e22205a9331f68d4dd8659d10.tar.gz |
Apply threshold filter to root node in calltree view.
MFC after: 3days
Diffstat (limited to 'usr.sbin/pmcstat/pmcpl_calltree.c')
-rw-r--r-- | usr.sbin/pmcstat/pmcpl_calltree.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/usr.sbin/pmcstat/pmcpl_calltree.c b/usr.sbin/pmcstat/pmcpl_calltree.c index 4f62c62..f8ceece 100644 --- a/usr.sbin/pmcstat/pmcpl_calltree.c +++ b/usr.sbin/pmcstat/pmcpl_calltree.c @@ -499,9 +499,10 @@ void pmcpl_ct_topdisplay(void) { int i, x, y, pmcin; - struct pmcpl_ct_sample rsamples; + struct pmcpl_ct_sample r, *rsamples; - pmcpl_ct_samples_root(&rsamples); + rsamples = &r; + pmcpl_ct_samples_root(rsamples); PMCSTAT_PRINTW("%-10.10s %s\n", "IMAGE", "CALLTREE"); @@ -524,16 +525,20 @@ pmcpl_ct_topdisplay(void) if (PMCPL_CT_SAMPLE(pmcin, &pmcpl_ct_root->pct_arc[i].pcta_samples) == 0) continue; + if (PMCPL_CT_SAMPLEP(pmcin, + &pmcpl_ct_root->pct_arc[i].pcta_samples) <= + pmcstat_threshold) + continue; if (pmcpl_ct_node_dumptop(pmcin, pmcpl_ct_root->pct_arc[i].pcta_child, - &rsamples, x, &y, pmcstat_displayheight - 2)) { + rsamples, x, &y, pmcstat_displayheight - 2)) { break; } } - pmcpl_ct_node_printtop(&rsamples, pmcin, y); + pmcpl_ct_node_printtop(rsamples, pmcin, y); } - pmcpl_ct_samples_free(&rsamples); + pmcpl_ct_samples_free(rsamples); } /* |