summaryrefslogtreecommitdiffstats
path: root/sys/sys/pmclog.h
diff options
context:
space:
mode:
authorfabient <fabient@FreeBSD.org>2012-03-28 20:58:30 +0000
committerfabient <fabient@FreeBSD.org>2012-03-28 20:58:30 +0000
commit5edfb77dd3a164bb9d2d40c6604faa6c9f3dce15 (patch)
treefadff08d26576c3d5c1cef9d47abd784602b237a /sys/sys/pmclog.h
parent9a7982e5a0267c0421856f3a43a1ae75880058f3 (diff)
downloadFreeBSD-src-5edfb77dd3a164bb9d2d40c6604faa6c9f3dce15.zip
FreeBSD-src-5edfb77dd3a164bb9d2d40c6604faa6c9f3dce15.tar.gz
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
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 f2b6480..69062f7 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;
OpenPOWER on IntegriCloud