Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Sep 2010 15:22:30 +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: r212745 - stable/7/usr.sbin/pmcstat
Message-ID:  <201009161522.o8GFMUI8096191@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fabient
Date: Thu Sep 16 15:22:30 2010
New Revision: 212745
URL: http://svn.freebsd.org/changeset/base/212745

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/7/usr.sbin/pmcstat/pmcpl_callgraph.c
  stable/7/usr.sbin/pmcstat/pmcpl_calltree.c
  stable/7/usr.sbin/pmcstat/pmcstat_log.c
  stable/7/usr.sbin/pmcstat/pmcstat_log.h
Directory Properties:
  stable/7/usr.sbin/pmcstat/   (props changed)

Modified: stable/7/usr.sbin/pmcstat/pmcpl_callgraph.c
==============================================================================
--- stable/7/usr.sbin/pmcstat/pmcpl_callgraph.c	Thu Sep 16 15:21:15 2010	(r212744)
+++ stable/7/usr.sbin/pmcstat/pmcpl_callgraph.c	Thu Sep 16 15:22:30 2010	(r212745)
@@ -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/7/usr.sbin/pmcstat/pmcpl_calltree.c
==============================================================================
--- stable/7/usr.sbin/pmcstat/pmcpl_calltree.c	Thu Sep 16 15:21:15 2010	(r212744)
+++ stable/7/usr.sbin/pmcstat/pmcpl_calltree.c	Thu Sep 16 15:22:30 2010	(r212745)
@@ -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/7/usr.sbin/pmcstat/pmcstat_log.c
==============================================================================
--- stable/7/usr.sbin/pmcstat/pmcstat_log.c	Thu Sep 16 15:21:15 2010	(r212744)
+++ stable/7/usr.sbin/pmcstat/pmcstat_log.c	Thu Sep 16 15:22:30 2010	(r212745)
@@ -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/7/usr.sbin/pmcstat/pmcstat_log.h
==============================================================================
--- stable/7/usr.sbin/pmcstat/pmcstat_log.h	Thu Sep 16 15:21:15 2010	(r212744)
+++ stable/7/usr.sbin/pmcstat/pmcstat_log.h	Thu Sep 16 15:22:30 2010	(r212745)
@@ -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 */



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