From owner-svn-src-all@FreeBSD.ORG Wed Apr 21 11:50:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D97D106566C; Wed, 21 Apr 2010 11:50:14 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BE9B8FC17; Wed, 21 Apr 2010 11:50:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3LBoEQH044259; Wed, 21 Apr 2010 11:50:14 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3LBoEGs044257; Wed, 21 Apr 2010 11:50:14 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004211150.o3LBoEGs044257@svn.freebsd.org> From: Fabien Thomas Date: Wed, 21 Apr 2010 11:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206994 - head/usr.sbin/pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2010 11:50:14 -0000 Author: fabient Date: Wed Apr 21 11:50:13 2010 New Revision: 206994 URL: http://svn.freebsd.org/changeset/base/206994 Log: Apply threshold filter to root node in calltree view. MFC after: 3days Modified: head/usr.sbin/pmcstat/pmcpl_calltree.c Modified: head/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_calltree.c Wed Apr 21 11:28:13 2010 (r206993) +++ head/usr.sbin/pmcstat/pmcpl_calltree.c Wed Apr 21 11:50:13 2010 (r206994) @@ -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); } /*