PAPI 7.1.0.0
Loading...
Searching...
No Matches
pfmlib_pentium4_priv.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2006 IBM Corp.
3 * Contributed by Kevin Corry <kevcorry@us.ibm.com>
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 * IN THE SOFTWARE.
22 *
23 * pfmlib_pentium4_priv.h
24 *
25 * Structures and definitions for use in the Pentium4/Xeon/EM64T libpfm code.
26 */
27
28#ifndef _PFMLIB_PENTIUM4_PRIV_H_
29#define _PFMLIB_PENTIUM4_PRIV_H_
30
46#define MAX_CCCRS_PER_ESCR 3
47
48typedef struct {
49 char *name;
50 int pmc;
51 int allowed_cccrs[MAX_CCCRS_PER_ESCR];
53
54
55/* CCCR: Counter Configuration Control Register
56 *
57 * These registers are used to configure the data counters. There are 18
58 * CCCRs, one for each data counter.
59 */
60
80#define MAX_ESCRS_PER_CCCR 8
81
82typedef struct {
83 char *name;
84 int pmc;
85 int pmd;
86 int allowed_escrs[MAX_ESCRS_PER_CCCR];
88
106typedef struct {
107 int enb;
110
121typedef struct {
122 char *name;
123 int type;
124 int index;
126
127#define PENTIUM4_PMC_TYPE_ESCR 1
128#define PENTIUM4_PMC_TYPE_CCCR 2
129
139typedef struct {
140 char *name;
141 char *desc;
142 unsigned int bit;
144
164#define MAX_ESCRS_PER_EVENT 2
165
166typedef struct {
167 char *name;
168 char *desc;
169 unsigned int event_select;
170 unsigned int escr_select;
171 int allowed_escrs[MAX_ESCRS_PER_EVENT];
174
175#endif
176
#define EVENT_MASK_BITS
#define MAX_CCCRS_PER_ESCR
#define MAX_ESCRS_PER_EVENT
#define MAX_ESCRS_PER_CCCR