From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 15:21:15 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 78CE510656B8; Thu, 16 Sep 2010 15:21:15 +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 5C8AE8FC14; Thu, 16 Sep 2010 15:21:15 +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 o8GFLFj9096079; Thu, 16 Sep 2010 15:21:15 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8GFLFH6096074; Thu, 16 Sep 2010 15:21:15 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201009161521.o8GFLFH6096074@svn.freebsd.org> From: Fabien Thomas Date: Thu, 16 Sep 2010 15:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212744 - stable/8/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: Thu, 16 Sep 2010 15:21:15 -0000 Author: fabient Date: Thu Sep 16 15:21:15 2010 New Revision: 212744 URL: http://svn.freebsd.org/changeset/base/212744 Log: MFC r212176: When an asm location cannot be resolved to a function the cost will be spread as small value and then filtered by the threshold. As a first step solution display the number of event that cannot be resolved as a valid function location. Modified: stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c stable/8/usr.sbin/pmcstat/pmcpl_calltree.c stable/8/usr.sbin/pmcstat/pmcstat_log.c stable/8/usr.sbin/pmcstat/pmcstat_log.h Directory Properties: stable/8/usr.sbin/pmcstat/ (props changed) Modified: stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c Thu Sep 16 15:19:39 2010 (r212743) +++ stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c Thu Sep 16 15:21:15 2010 (r212744) @@ -149,6 +149,8 @@ pmcstat_cgnode_hash_lookup_pc(struct pmc */ if ((sym = pmcstat_symbol_search(image, pc)) != NULL) pc = sym->ps_start; + else + pmcstat_stats.ps_samples_unknown_function++; for (hash = i = 0; i < sizeof(uintfptr_t); i++) hash += (pc >> i) & 0xFF; Modified: stable/8/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcpl_calltree.c Thu Sep 16 15:19:39 2010 (r212743) +++ stable/8/usr.sbin/pmcstat/pmcpl_calltree.c Thu Sep 16 15:21:15 2010 (r212744) @@ -615,6 +615,8 @@ pmcpl_ct_node_hash_lookup_pc(struct pmcp */ if ((sym = pmcstat_symbol_search(image, pc)) != NULL) pc = sym->ps_start; + else + pmcstat_stats.ps_samples_unknown_function++; for (hash = i = 0; i < (int)sizeof(uintfptr_t); i++) hash += (pc >> i) & 0xFF; Modified: stable/8/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcstat_log.c Thu Sep 16 15:19:39 2010 (r212743) +++ stable/8/usr.sbin/pmcstat/pmcstat_log.c Thu Sep 16 15:21:15 2010 (r212744) @@ -2170,6 +2170,7 @@ pmcstat_shutdown_logging(void) PRINT("#samples/total", samples_total); PRINT("#samples/unclaimed", samples_unknown_offset); PRINT("#samples/unknown-object", samples_indeterminable); + PRINT("#samples/unknown-function", samples_unknown_function); PRINT("#callchain/dubious-frames", callchain_dubious_frames); } Modified: stable/8/usr.sbin/pmcstat/pmcstat_log.h ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcstat_log.h Thu Sep 16 15:19:39 2010 (r212743) +++ stable/8/usr.sbin/pmcstat/pmcstat_log.h Thu Sep 16 15:21:15 2010 (r212744) @@ -164,6 +164,7 @@ struct pmcstat_stats { int ps_samples_skipped; /* #samples filtered out for any reason */ int ps_samples_unknown_offset; /* #samples of rank 0 not in a map */ int ps_samples_indeterminable; /* #samples in indeterminable images */ + int ps_samples_unknown_function;/* #samples with unknown function at offset */ int ps_callchain_dubious_frames;/* #dubious frame pointers seen */ }; extern struct pmcstat_stats pmcstat_stats; /* statistics */