PAPI
7.1.0.0
Loading...
Searching...
No Matches
pfmlib_itanium_priv.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
3
* Contributed by Stephane Eranian <eranian@hpl.hp.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/ia64.
24
*/
25
#ifndef __PFMLIB_ITANIUM_PRIV_H__
26
#define __PFMLIB_ITANIUM_PRIV_H__
27
28
/*
29
* Itanium encoding structure
30
* (code must be first 8 bits)
31
*/
32
typedef
struct
{
33
unsigned
long
pme_code
:8;
/* major event code */
34
unsigned
long
pme_ear
:1;
/* is EAR event */
35
unsigned
long
pme_dear
:1;
/* 1=Data 0=Instr */
36
unsigned
long
pme_tlb
:1;
/* 1=TLB 0=Cache */
37
unsigned
long
pme_btb
:1;
/* 1=BTB */
38
unsigned
long
pme_ig1
:4;
/* ignored */
39
unsigned
long
pme_umask
:16;
/* unit mask*/
40
unsigned
long
pme_ig
:32;
/* ignored */
41
}
pme_ita_entry_code_t
;
42
43
#define PME_UMASK_NONE 0x0
44
45
typedef
union
{
46
unsigned
long
pme_vcode
;
47
pme_ita_entry_code_t
pme_ita_code
;
/* must not be larger than vcode */
48
}
pme_ita_code_t
;
49
50
typedef
union
{
51
unsigned
long
qual
;
/* generic qualifier */
52
struct
{
53
unsigned
long
pme_iar
:1;
/* instruction address range supported */
54
unsigned
long
pme_opm
:1;
/* opcode match supported */
55
unsigned
long
pme_dar
:1;
/* data address range supported */
56
unsigned
long
pme_reserved
:61;
/* not used */
57
} pme_qual;
58
}
pme_ita_qualifiers_t
;
59
60
typedef
struct
{
61
char
*
pme_name
;
62
pme_ita_code_t
pme_entry_code
;
63
unsigned
long
pme_counters
;
/* supported counters */
64
unsigned
int
pme_maxincr
;
65
pme_ita_qualifiers_t
pme_qualifiers
;
66
char
*
pme_desc
;
67
}
pme_ita_entry_t
;
68
69
/*
70
* We embed the umask value into the event code. Because it really is
71
* like a subevent.
72
* pme_code:
73
* - lower 16 bits: major event code
74
* - upper 16 bits: unit mask
75
*/
76
#define pme_code pme_entry_code.pme_ita_code.pme_code
77
#define pme_ear pme_entry_code.pme_ita_code.pme_ear
78
#define pme_dear pme_entry_code.pme_ita_code.pme_dear
79
#define pme_tlb pme_entry_code.pme_ita_code.pme_tlb
80
#define pme_btb pme_entry_code.pme_ita_code.pme_btb
81
#define pme_umask pme_entry_code.pme_ita_code.pme_umask
82
#define pme_used pme_qualifiers.pme_qual_struct.pme_used
83
84
#define event_is_ear(e) ((e)->pme_ear == 1)
85
#define event_is_iear(e) ((e)->pme_ear == 1 && (e)->pme_dear==0)
86
#define event_is_dear(e) ((e)->pme_ear == 1 && (e)->pme_dear==1)
87
#define event_is_tlb_ear(e) ((e)->pme_ear == 1 && (e)->pme_tlb==1)
88
#define event_is_btb(e) ((e)->pme_btb)
89
90
#define event_opcm_ok(e) ((e)->pme_qualifiers.pme_qual.pme_opm==1)
91
#define event_iarr_ok(e) ((e)->pme_qualifiers.pme_qual.pme_iar==1)
92
#define event_darr_ok(e) ((e)->pme_qualifiers.pme_qual.pme_dar==1)
93
94
#endif
/* __PFMLIB_ITANIUM_PRIV_H__ */
pme_ita_entry_code_t
Definition:
pfmlib_itanium_priv.h:32
pme_ita_entry_code_t::pme_code
unsigned long pme_code
Definition:
pfmlib_itanium_priv.h:33
pme_ita_entry_code_t::pme_umask
unsigned long pme_umask
Definition:
pfmlib_itanium_priv.h:39
pme_ita_entry_code_t::pme_tlb
unsigned long pme_tlb
Definition:
pfmlib_itanium_priv.h:36
pme_ita_entry_code_t::pme_btb
unsigned long pme_btb
Definition:
pfmlib_itanium_priv.h:37
pme_ita_entry_code_t::pme_dear
unsigned long pme_dear
Definition:
pfmlib_itanium_priv.h:35
pme_ita_entry_code_t::pme_ig
unsigned long pme_ig
Definition:
pfmlib_itanium_priv.h:40
pme_ita_entry_code_t::pme_ig1
unsigned long pme_ig1
Definition:
pfmlib_itanium_priv.h:38
pme_ita_entry_code_t::pme_ear
unsigned long pme_ear
Definition:
pfmlib_itanium_priv.h:34
pme_ita_entry_t
Definition:
pfmlib_itanium_priv.h:60
pme_ita_entry_t::pme_entry_code
pme_ita_code_t pme_entry_code
Definition:
pfmlib_itanium_priv.h:62
pme_ita_entry_t::pme_qualifiers
pme_ita_qualifiers_t pme_qualifiers
Definition:
pfmlib_itanium_priv.h:65
pme_ita_entry_t::pme_desc
char * pme_desc
Definition:
pfmlib_itanium_priv.h:66
pme_ita_entry_t::pme_maxincr
unsigned int pme_maxincr
Definition:
pfmlib_itanium_priv.h:64
pme_ita_entry_t::pme_counters
unsigned long pme_counters
Definition:
pfmlib_itanium_priv.h:63
pme_ita_entry_t::pme_name
char * pme_name
Definition:
pfmlib_itanium_priv.h:61
pme_ita_code_t
Definition:
pfmlib_itanium_priv.h:45
pme_ita_code_t::pme_ita_code
pme_ita_entry_code_t pme_ita_code
Definition:
pfmlib_itanium_priv.h:47
pme_ita_code_t::pme_vcode
unsigned long pme_vcode
Definition:
pfmlib_itanium_priv.h:46
pme_ita_qualifiers_t
Definition:
pfmlib_itanium_priv.h:50
pme_ita_qualifiers_t::qual
unsigned long qual
Definition:
pfmlib_itanium_priv.h:51
pme_ita_qualifiers_t::pme_opm
unsigned long pme_opm
Definition:
pfmlib_itanium_priv.h:54
pme_ita_qualifiers_t::pme_dar
unsigned long pme_dar
Definition:
pfmlib_itanium_priv.h:55
pme_ita_qualifiers_t::pme_reserved
unsigned long pme_reserved
Definition:
pfmlib_itanium_priv.h:56
pme_ita_qualifiers_t::pme_iar
unsigned long pme_iar
Definition:
pfmlib_itanium_priv.h:53
src
libperfnec
lib
pfmlib_itanium_priv.h
Generated on Wed Dec 20 2023 18:12:52 for PAPI by
1.9.6