Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Apr 2010 16:17:52 +0000 (UTC)
From:      Fabien Thomas <fabient@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r207193 - stable/7/usr.sbin/pmcstat
Message-ID:  <201004251617.o3PGHqYG004334@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fabient
Date: Sun Apr 25 16:17:52 2010
New Revision: 207193
URL: http://svn.freebsd.org/changeset/base/207193

Log:
  MFC r206994:
  Apply threshold filter to root node in calltree view.

Modified:
  stable/7/usr.sbin/pmcstat/pmcpl_calltree.c
Directory Properties:
  stable/7/usr.sbin/pmcstat/   (props changed)

Modified: stable/7/usr.sbin/pmcstat/pmcpl_calltree.c
==============================================================================
--- stable/7/usr.sbin/pmcstat/pmcpl_calltree.c	Sun Apr 25 16:16:43 2010	(r207192)
+++ stable/7/usr.sbin/pmcstat/pmcpl_calltree.c	Sun Apr 25 16:17:52 2010	(r207193)
@@ -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);
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004251617.o3PGHqYG004334>