summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pmcstat/pmcstat.h
diff options
context:
space:
mode:
authorjkoshy <jkoshy@FreeBSD.org>2007-12-07 08:26:21 +0000
committerjkoshy <jkoshy@FreeBSD.org>2007-12-07 08:26:21 +0000
commit2aef7957ec96361c7cf73dee65ee4512b39e1de5 (patch)
tree6048997529363b686719d6493260bacb261191c8 /usr.sbin/pmcstat/pmcstat.h
parent72c27d71d82569aec187c30f6ff208631abc02f4 (diff)
downloadFreeBSD-src-2aef7957ec96361c7cf73dee65ee4512b39e1de5.zip
FreeBSD-src-2aef7957ec96361c7cf73dee65ee4512b39e1de5.tar.gz
Introduce pmcstat(8) changes for summarizing hwpmc(4) callchain records in
in textual form and in gmon.out format. Update manual page. Sponsored by: FreeBSD Foundation and Google Inc.
Diffstat (limited to 'usr.sbin/pmcstat/pmcstat.h')
-rw-r--r--usr.sbin/pmcstat/pmcstat.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/usr.sbin/pmcstat/pmcstat.h b/usr.sbin/pmcstat/pmcstat.h
index 5b062a9..e46109a 100644
--- a/usr.sbin/pmcstat/pmcstat.h
+++ b/usr.sbin/pmcstat/pmcstat.h
@@ -1,7 +1,11 @@
/*-
* Copyright (c) 2005-2007, Joseph Koshy
+ * Copyright (c) 2007 The FreeBSD Foundation
* All rights reserved.
*
+ * Portions of this software were developed by A. Joseph Koshy under
+ * sponsorship from the FreeBSD Foundation and Google, Inc.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -43,11 +47,14 @@
#define FLAG_HAS_SAMPLESDIR 0x00000800 /* -D dir */
#define FLAG_HAS_KERNELPATH 0x00001000 /* -k kernel */
#define FLAG_DO_PRINT 0x00002000 /* -o */
+#define FLAG_DO_CALLGRAPHS 0x00004000 /* -G */
+#define FLAG_DO_ANALYSIS 0x00008000 /* -g or -G */
#define DEFAULT_SAMPLE_COUNT 65536
#define DEFAULT_WAIT_INTERVAL 5.0
#define DEFAULT_DISPLAY_HEIGHT 23
#define DEFAULT_BUFFER_SIZE 4096
+#define DEFAULT_CALLGRAPH_DEPTH 4
#define PRINT_HEADER_PREFIX "# "
#define READPIPEFD 0
@@ -68,9 +75,9 @@
#define PMCSTAT_LDD_COMMAND "/usr/bin/ldd"
#define PMCSTAT_PRINT_ENTRY(A,T,...) do { \
- fprintf((A)->pa_printfile, "%-8s", T); \
- fprintf((A)->pa_printfile, " " __VA_ARGS__); \
- fprintf((A)->pa_printfile, "\n"); \
+ (void) fprintf((A)->pa_printfile, "%-9s", T); \
+ (void) fprintf((A)->pa_printfile, " " __VA_ARGS__); \
+ (void) fprintf((A)->pa_printfile, "\n"); \
} while (0)
enum pmcstat_state {
@@ -112,7 +119,10 @@ struct pmcstat_args {
char *pa_kernel; /* pathname of the kernel */
const char *pa_samplesdir; /* directory for profile files */
const char *pa_mapfilename;/* mapfile name */
+ FILE *pa_graphfile; /* where to send the callgraph */
+ int pa_graphdepth; /* print depth for callgraphs */
double pa_interval; /* printing interval in seconds */
+ uint32_t pa_cpumask; /* filter for CPUs analysed */
int pa_argc;
char **pa_argv;
STAILQ_HEAD(, pmcstat_ev) pa_events;
OpenPOWER on IntegriCloud