summaryrefslogtreecommitdiffstats
path: root/src/plugins/perfmon/perfmon.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-01-28 13:27:31 +0100
committerFilip Tehlar <ftehlar@cisco.com>2019-03-20 03:06:52 -0700
commit47d165e4c1a5f571995d39b0ce142c06f17dea47 (patch)
tree8490a7c1194967746017df72c3e3322831a2203e /src/plugins/perfmon/perfmon.h
parentd89411ef5f59b91101b0311a2dd41a3641985d1e (diff)
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 <damarion@cisco.com>
Diffstat (limited to 'src/plugins/perfmon/perfmon.h')
-rw-r--r--src/plugins/perfmon/perfmon.h17
1 files changed, 8 insertions, 9 deletions
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 <vppinfra/error.h>
#include <linux/perf_event.h>
+#include <perfmon/perfmon_intel.h>
#define foreach_perfmon_event \
_(PERF_TYPE_HARDWARE, PERF_COUNT_HW_CPU_CYCLES, "cpu-cycles") \
@@ -71,12 +72,6 @@ typedef struct
typedef struct
{
- u32 cpuid;
- const char **table;
-} perfmon_cpuid_and_table_t;
-
-typedef struct
-{
u8 *name;
u8 *value;
} name_value_pair_t;
@@ -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;