summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pmcstat
diff options
context:
space:
mode:
authorfabient <fabient@FreeBSD.org>2010-08-02 13:40:19 +0000
committerfabient <fabient@FreeBSD.org>2010-08-02 13:40:19 +0000
commit796dcddd184bb641110681caa8686cd769bc02ac (patch)
treebda63820659c50ac91ef2dbab9c775c446c7589d /usr.sbin/pmcstat
parent02bd58e3fa3104de650c1f8e6d0cfed41b1d94ad (diff)
downloadFreeBSD-src-796dcddd184bb641110681caa8686cd769bc02ac.zip
FreeBSD-src-796dcddd184bb641110681caa8686cd769bc02ac.tar.gz
Fix the calltree top view that incorrectly filter out some nodes.
MFC after: 1 week
Diffstat (limited to 'usr.sbin/pmcstat')
-rw-r--r--usr.sbin/pmcstat/pmcpl_calltree.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/pmcstat/pmcpl_calltree.c b/usr.sbin/pmcstat/pmcpl_calltree.c
index b0f1c6e..7ecc56f 100644
--- a/usr.sbin/pmcstat/pmcpl_calltree.c
+++ b/usr.sbin/pmcstat/pmcpl_calltree.c
@@ -354,6 +354,7 @@ pmcpl_ct_node_dumptop(int pmcin, struct pmcpl_ct_node *ct,
struct pmcpl_ct_sample *rsamples, int x, int *y)
{
int i, terminal;
+ struct pmcpl_ct_arc *arc;
if (ct->pct_flags & PMCPL_PCT_TAG)
return 0;
@@ -372,12 +373,17 @@ pmcpl_ct_node_dumptop(int pmcin, struct pmcpl_ct_node *ct,
* for at least one arc for that PMC.
*/
terminal = 1;
- for (i = 0; i < ct->pct_narc; i++)
+ for (i = 0; i < ct->pct_narc; i++) {
+ arc = &ct->pct_arc[i];
if (PMCPL_CT_SAMPLE(pmcin,
- &ct->pct_arc[i].pcta_samples) != 0) {
+ &arc->pcta_samples) != 0 &&
+ PMCPL_CT_SAMPLEP(pmcin,
+ &arc->pcta_samples) > pmcstat_threshold &&
+ (arc->pcta_child->pct_flags & PMCPL_PCT_TAG) == 0) {
terminal = 0;
break;
}
+ }
if (ct->pct_narc == 0 || terminal) {
pmcpl_ct_topscreen[x+1][*y] = NULL;
OpenPOWER on IntegriCloud