From 47d165e4c1a5f571995d39b0ce142c06f17dea47 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Mon, 28 Jan 2019 13:27:31 +0100 Subject: perfmon: python to C parser for intel CPUs EXAMPLE: src/plugins/perfmon/intel_json_to_c.py \ -i skylakex_core_v1.12.json \ -o src/plugins/perfmon/perfmon_intel_skx.c \ -m 0x55,0 \ -m 0x55,1 \ -m 0x55,2 \ -m 0x55,3 Change-Id: I16ce059e231d340ecfcb6f6638e29c5b46304683 Signed-off-by: Damjan Marion --- src/plugins/perfmon/perfmon.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/plugins/perfmon/perfmon.h') diff --git a/src/plugins/perfmon/perfmon.h b/src/plugins/perfmon/perfmon.h index 9c4c34e36c1..000e3c2849c 100644 --- a/src/plugins/perfmon/perfmon.h +++ b/src/plugins/perfmon/perfmon.h @@ -26,6 +26,7 @@ #include #include +#include #define foreach_perfmon_event \ _(PERF_TYPE_HARDWARE, PERF_COUNT_HW_CPU_CYCLES, "cpu-cycles") \ @@ -69,12 +70,6 @@ typedef struct u64 *vectors_this_counter; } perfmon_capture_t; -typedef struct -{ - u32 cpuid; - const char **table; -} perfmon_cpuid_and_table_t; - typedef struct { u8 *name; @@ -93,9 +88,13 @@ typedef struct perfmon_capture_t *capture_pool; uword *capture_by_thread_and_node_name; - /* CPU-specific event tables, hash table of selected table (if any) */ - perfmon_cpuid_and_table_t *perfmon_tables; - uword *perfmon_table; + /* vector of registered perfmon tables */ + perfmon_intel_pmc_registration_t *perfmon_tables; + + /* active table */ + perfmon_intel_pmc_event_t *perfmon_table; + + uword *pmc_event_by_name; /* vector of single events to collect */ perfmon_event_config_t *single_events_to_collect; -- cgit 1.2.3-korg