aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/pmclog.h
diff options
context:
space:
mode:
authorFabien Thomas <fabient@FreeBSD.org>2012-03-28 20:58:30 +0000
committerFabien Thomas <fabient@FreeBSD.org>2012-03-28 20:58:30 +0000
commitf5f9340b9807d44d200658ba1bbbbbb57ab72e07 (patch)
treefadff08d26576c3d5c1cef9d47abd784602b237a /sys/sys/pmclog.h
parent1faacf5d0925fb593d0d5a17dbd3b0d705bdd478 (diff)
downloadsrc-f5f9340b9807d44d200658ba1bbbbbb57ab72e07.tar.gz
src-f5f9340b9807d44d200658ba1bbbbbb57ab72e07.zip
Add software PMC support.
New kernel events can be added at various location for sampling or counting. This will for example allow easy system profiling whatever the processor is with known tools like pmcstat(8). Simultaneous usage of software PMC and hardware PMC is possible, for example looking at the lock acquire failure, page fault while sampling on instructions. Sponsored by: NETASQ MFC after: 1 month
Notes
Notes: svn path=/head/; revision=233628
Diffstat (limited to 'sys/sys/pmclog.h')
-rw-r--r--sys/sys/pmclog.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/sys/pmclog.h b/sys/sys/pmclog.h
index f2b6480a52c2..69062f7fe895 100644
--- a/sys/sys/pmclog.h
+++ b/sys/sys/pmclog.h
@@ -60,7 +60,13 @@ enum pmclog_type {
*/
PMCLOG_TYPE_MAP_IN,
PMCLOG_TYPE_MAP_OUT,
- PMCLOG_TYPE_CALLCHAIN
+ PMCLOG_TYPE_CALLCHAIN,
+ /*
+ * V3 ABI
+ *
+ * New variant of PMCLOG_TYPE_PMCALLOCATE for dynamic event.
+ */
+ PMCLOG_TYPE_PMCALLOCATEDYN
};
/*
@@ -204,6 +210,14 @@ struct pmclog_userdata {
uint32_t pl_userdata;
} __packed;
+struct pmclog_pmcallocatedyn {
+ PMCLOG_ENTRY_HEADER
+ uint32_t pl_pmcid;
+ uint32_t pl_event;
+ uint32_t pl_flags;
+ char pl_evname[PMC_NAME_MAX];
+} __packed;
+
union pmclog_entry { /* only used to size scratch areas */
struct pmclog_callchain pl_cc;
struct pmclog_closelog pl_cl;
@@ -213,6 +227,7 @@ union pmclog_entry { /* only used to size scratch areas */
struct pmclog_map_out pl_mo;
struct pmclog_pcsample pl_s;
struct pmclog_pmcallocate pl_a;
+ struct pmclog_pmcallocatedyn pl_ad;
struct pmclog_pmcattach pl_t;
struct pmclog_pmcdetach pl_d;
struct pmclog_proccsw pl_c;