aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pmcstat
diff options
context:
space:
mode:
authorFabien Thomas <fabient@FreeBSD.org>2010-09-03 13:54:02 +0000
committerFabien Thomas <fabient@FreeBSD.org>2010-09-03 13:54:02 +0000
commiteb707d6039d14d550c656283af3d3bfbb3aafc03 (patch)
tree73bfd0bd3805598ab724fffe235798ea9c7bad8d /usr.sbin/pmcstat
parenta9b89cf1c1f8581c33745a7228f44ca888742165 (diff)
downloadsrc-eb707d6039d14d550c656283af3d3bfbb3aafc03.tar.gz
src-eb707d6039d14d550c656283af3d3bfbb3aafc03.zip
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. MFC after: 1week
Notes
Notes: svn path=/head/; revision=212176
Diffstat (limited to 'usr.sbin/pmcstat')
-rw-r--r--usr.sbin/pmcstat/pmcpl_callgraph.c2
-rw-r--r--usr.sbin/pmcstat/pmcpl_calltree.c2
-rw-r--r--usr.sbin/pmcstat/pmcstat_log.c1
-rw-r--r--usr.sbin/pmcstat/pmcstat_log.h1
4 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/pmcstat/pmcpl_callgraph.c b/usr.sbin/pmcstat/pmcpl_callgraph.c
index d948b77f43b6..33998b51baac 100644
--- a/usr.sbin/pmcstat/pmcpl_callgraph.c
+++ b/usr.sbin/pmcstat/pmcpl_callgraph.c
@@ -149,6 +149,8 @@ pmcstat_cgnode_hash_lookup_pc(struct pmcstat_process *pp, pmc_id_t pmcid,
*/
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;
diff --git a/usr.sbin/pmcstat/pmcpl_calltree.c b/usr.sbin/pmcstat/pmcpl_calltree.c
index 7ecc56f554d8..c647a325a020 100644
--- a/usr.sbin/pmcstat/pmcpl_calltree.c
+++ b/usr.sbin/pmcstat/pmcpl_calltree.c
@@ -615,6 +615,8 @@ pmcpl_ct_node_hash_lookup_pc(struct pmcpl_ct_node *parent,
*/
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;
diff --git a/usr.sbin/pmcstat/pmcstat_log.c b/usr.sbin/pmcstat/pmcstat_log.c
index d9e6059ee6c9..bebe94527565 100644
--- a/usr.sbin/pmcstat/pmcstat_log.c
+++ b/usr.sbin/pmcstat/pmcstat_log.c
@@ -2168,6 +2168,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);
}
diff --git a/usr.sbin/pmcstat/pmcstat_log.h b/usr.sbin/pmcstat/pmcstat_log.h
index 8936fad0581f..bfa925c52221 100644
--- a/usr.sbin/pmcstat/pmcstat_log.h
+++ b/usr.sbin/pmcstat/pmcstat_log.h
@@ -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 */