svn commit: r211096 - stable/8/usr.sbin/pmcstat

Fabien Thomas fabient at FreeBSD.org
Mon Aug 9 14:25:58 UTC 2010


Author: fabient
Date: Mon Aug  9 14:25:58 2010
New Revision: 211096
URL: http://svn.freebsd.org/changeset/base/211096

Log:
  MFC r210766:
  Fix the calltree top view that incorrectly filter out some nodes.

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

Modified: stable/8/usr.sbin/pmcstat/pmcpl_calltree.c
==============================================================================
--- stable/8/usr.sbin/pmcstat/pmcpl_calltree.c	Mon Aug  9 12:36:36 2010	(r211095)
+++ stable/8/usr.sbin/pmcstat/pmcpl_calltree.c	Mon Aug  9 14:25:58 2010	(r211096)
@@ -354,6 +354,7 @@ pmcpl_ct_node_dumptop(int pmcin, struct 
     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 
 	 * 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;


More information about the svn-src-all mailing list