PAPI 7.1.0.0
Loading...
Searching...
No Matches
pfmlib_gen_ia64.h
Go to the documentation of this file.
1/*
2 * Generic IA-64 PMU specific types and definitions
3 *
4 * Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
5 * Contributed by Stephane Eranian <eranian@hpl.hp.com>
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
11 * of the Software, and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in all
15 * copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
19 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
21 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
22 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24#ifndef __PFMLIB_GEN_IA64_H__
25#define __PFMLIB_GEN_IA64_H__
26
27#include <perfmon/pfmlib.h>
28#include <endian.h>
29
30#if BYTE_ORDER != LITTLE_ENDIAN
31#error "this file only supports little endian environments"
32#endif
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38#define PMU_GEN_IA64_FIRST_COUNTER 4 /* index of first PMC/PMD counter */
39#define PMU_GEN_IA64_NUM_COUNTERS 4 /* total numbers of PMC/PMD pairs used as counting monitors */
40#define PMU_GEN_IA64_NUM_PMCS 8 /* total number of PMCS defined */
41#define PMU_GEN_IA64_NUM_PMDS 4 /* total number of PMDS defined */
42
43/*
44 * architected PMC register structure
45 */
46typedef union {
47 unsigned long pmc_val; /* generic PMC register */
48 struct {
49 unsigned long pmc_plm:4; /* privilege level mask */
50 unsigned long pmc_ev:1; /* external visibility */
51 unsigned long pmc_oi:1; /* overflow interrupt */
52 unsigned long pmc_pm:1; /* privileged monitor */
53 unsigned long pmc_ig1:1; /* reserved */
54 unsigned long pmc_es:8; /* event select */
55 unsigned long pmc_ig2:48; /* reserved */
56 } pmc_gen_count_reg;
58
59typedef struct {
60 unsigned long pmd_val; /* generic counter value */
62
63#ifdef __cplusplus /* extern C */
64}
65#endif
66
67#endif /* __PFMLIB_GEN_IA64_H__ */
68