FD.io VPP
v20.05.1-6-gf53edbc3b
Vector Packet Processing
perfmon_intel.h
Go to the documentation of this file.
1
/*
2
*------------------------------------------------------------------
3
* Copyright (c) 2019 Cisco and/or its affiliates.
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at:
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*------------------------------------------------------------------
16
*/
17
18
#ifndef _PERFMON_INTEL_H_
19
#define _PERFMON_INTEL_H_
20
21
#include <
vppinfra/clib.h
>
22
#include <
vppinfra/format.h
>
23
24
typedef
struct
25
{
26
u8
event_code[2];
27
u8
umask
;
28
char
*
event_name
;
29
}
perfmon_intel_pmc_event_t
;
30
31
typedef
struct
32
{
33
u8
model
;
34
u8
stepping
;
35
u8
has_stepping
;
36
}
perfmon_intel_pmc_cpu_model_t
;
37
38
typedef
struct
39
{
40
perfmon_intel_pmc_event_t
*
events
;
41
perfmon_intel_pmc_cpu_model_t
*
models
;
42
u32
n_events
;
43
u32
n_models
;
44
}
perfmon_intel_pmc_registration_t
;
45
46
47
void
48
perfmon_register_intel_pmc
(
perfmon_intel_pmc_cpu_model_t
* m,
int
n_models,
49
perfmon_intel_pmc_event_t
* e,
int
n_events);
50
51
#define PERFMON_REGISTER_INTEL_PMC(m, e) \
52
static void __clib_constructor \
53
perfmon_register_intel_pmc_constructor() \
54
{ \
55
perfmon_register_intel_pmc (m, ARRAY_LEN(m), e, ARRAY_LEN (e)); \
56
}
57
58
#endif
/* _PERFMON_INTEL_H_ */
59
60
/*
61
* fd.io coding-style-patch-verification: ON
62
*
63
* Local Variables:
64
* eval: (c-set-style "gnu")
65
* End:
66
*/
perfmon_intel_pmc_cpu_model_t::has_stepping
u8 has_stepping
Definition:
perfmon_intel.h:35
perfmon_intel_pmc_registration_t
Definition:
perfmon_intel.h:38
perfmon_register_intel_pmc
void perfmon_register_intel_pmc(perfmon_intel_pmc_cpu_model_t *m, int n_models, perfmon_intel_pmc_event_t *e, int n_events)
Definition:
perfmon.c:31
perfmon_intel_pmc_cpu_model_t::model
u8 model
Definition:
perfmon_intel.h:33
perfmon_intel_pmc_cpu_model_t
Definition:
perfmon_intel.h:31
perfmon_intel_pmc_event_t
Definition:
perfmon_intel.h:24
u8
unsigned char u8
Definition:
types.h:56
perfmon_intel_pmc_event_t::umask
u8 umask
Definition:
perfmon_intel.h:27
perfmon_intel_pmc_event_t::event_name
char * event_name
Definition:
perfmon_intel.h:28
u32
unsigned int u32
Definition:
types.h:88
perfmon_intel_pmc_registration_t::n_events
u32 n_events
Definition:
perfmon_intel.h:42
perfmon_intel_pmc_registration_t::events
perfmon_intel_pmc_event_t * events
Definition:
perfmon_intel.h:40
perfmon_intel_pmc_registration_t::models
perfmon_intel_pmc_cpu_model_t * models
Definition:
perfmon_intel.h:41
format.h
perfmon_intel_pmc_cpu_model_t::stepping
u8 stepping
Definition:
perfmon_intel.h:34
clib.h
perfmon_intel_pmc_registration_t::n_models
u32 n_models
Definition:
perfmon_intel.h:43
src
plugins
perfmon
perfmon_intel.h
Generated on Mon Oct 12 2020 16:04:14 for FD.io VPP by
1.8.13