PAPI 7.1.0.0
Loading...
Searching...
No Matches
pfmlib_intel_nhm_priv.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 Google, Inc
3 * Contributed by Stephane Eranian <eranian@gmail.com>
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9 * of the Software, and to permit persons to whom the Software is furnished to do so,
10 * subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in all
13 * copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
16 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
17 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
19 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
20 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 *
22 * This file is part of libpfm, a performance monitoring support library for
23 * applications on Linux.
24 */
25#ifndef __PFMLIB_NHM_PRIV_H__
26#define __PFMLIB_NHM_PRIV_H__
27
28#define PFMLIB_NHM_MAX_UMASK 32
29
30typedef struct {
31 char *pme_uname; /* unit mask name */
32 char *pme_udesc; /* event/umask description */
33 unsigned int pme_cntmsk; /* counter mask */
34 unsigned int pme_ucode; /* unit mask code */
35 unsigned int pme_uflags; /* unit mask flags */
36 unsigned int pme_umodel; /* CPU model for this umask */
38
39typedef struct {
40 char *pme_name; /* event name */
41 char *pme_desc; /* event description */
42 unsigned int pme_code; /* event code */
43 unsigned int pme_cntmsk; /* counter mask */
44 unsigned int pme_numasks; /* number of umasks */
45 unsigned int pme_flags; /* flags */
46 pme_nhm_umask_t pme_umasks[PFMLIB_NHM_MAX_UMASK]; /* umask desc */
48
49/*
50 * pme_flags value (event and unit mask)
51 */
52
53/* event or unit-mask level constraints */
54#define PFMLIB_NHM_UMASK_NCOMBO 0x001 /* unit mask cannot be combined (default: combination ok) */
55#define PFMLIB_NHM_FIXED0 0x002 /* event supported by FIXED_CTR0, can work on generic counters */
56#define PFMLIB_NHM_FIXED1 0x004 /* event supported by FIXED_CTR1, can work on generic counters */
57#define PFMLIB_NHM_FIXED2_ONLY 0x008 /* only works in FIXED_CTR2 */
58#define PFMLIB_NHM_OFFCORE_RSP0 0x010 /* requires OFFCORE_RSP0 register */
59#define PFMLIB_NHM_PMC01 0x020 /* works only on IA32_PMC0 or IA32_PMC1 */
60#define PFMLIB_NHM_PEBS 0x040 /* support PEBS (precise event) */
61#define PFMLIB_NHM_UNC 0x080 /* uncore event */
62#define PFMLIB_NHM_UNC_FIXED 0x100 /* uncore fixed event */
63#define PFMLIB_NHM_OFFCORE_RSP1 0x200 /* requires OFFCORE_RSP1 register */
64#define PFMLIB_NHM_PMC0 0x400 /* works only on IA32_PMC0 */
65#define PFMLIB_NHM_EX 0x800 /* has Nehalem-EX specific unit masks */
66
67#endif /* __PFMLIB_NHM_PRIV_H__ */
#define PFMLIB_NHM_MAX_UMASK
unsigned int pme_cntmsk
unsigned int pme_code
char * pme_desc
unsigned int pme_numasks
char * pme_name
unsigned int pme_flags