PAPI
7.1.0.0
Loading...
Searching...
No Matches
perfmon_dfl_smpl.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
3
* Contributed by Stephane Eranian <eranian@hpl.hp.com>
4
*
5
* This file implements the new dfl sampling buffer format
6
* for perfmon2 subsystem.
7
*
8
* This format is supported used by all platforms. For IA-64, older
9
* applications using perfmon v2.0 MUST use the
10
* perfmon_default_smpl.h
11
*/
12
#ifndef __PERFMON_DFL_SMPL_H__
13
#define __PERFMON_DFL_SMPL_H__ 1
14
15
#ifdef __cplusplus
16
extern
"C"
{
17
#endif
18
19
#include <
perfmon/perfmon.h
>
20
21
#define PFM_DFL_SMPL_NAME "default"
22
23
#ifdef PFMLIB_OLD_PFMV2
24
/*
25
* UUID for compatibility with perfmon v2.2 (used by Cray)
26
*/
27
#define PFM_DFL_SMPL_UUID { \
28
0xd1, 0x39, 0xb2, 0x9e, 0x62, 0xe8, 0x40, 0xe4,\
29
0xb4, 0x02, 0x73, 0x07, 0x87, 0x92, 0xe9, 0x37 }
30
#endif
31
32
/*
33
* format specific parameters (passed at context creation)
34
*/
35
typedef
struct
{
36
uint64_t
buf_size
;
/* size of the buffer in bytes */
37
uint32_t
buf_flags
;
/* buffer specific flags */
38
uint32_t
res1
;
/* for future use */
39
uint64_t
reserved
[6];
/* for future use */
40
}
pfm_dfl_smpl_arg_t
;
41
42
/*
43
* This header is at the beginning of the sampling buffer returned to the user.
44
* It is directly followed by the first record.
45
*/
46
typedef
struct
{
47
uint64_t
hdr_count
;
/* how many valid entries */
48
uint64_t
hdr_cur_offs
;
/* current offset from top of buffer */
49
uint64_t
hdr_overflows
;
/* #overflows for buffer */
50
uint64_t
hdr_buf_size
;
/* bytes in the buffer */
51
uint64_t
hdr_min_buf_space
;
/* minimal buffer size (internal use) */
52
uint32_t
hdr_version
;
/* smpl format version */
53
uint32_t
hdr_buf_flags
;
/* copy of buf_flags */
54
uint64_t hdr_reserved[10];
/* for future use */
55
}
pfm_dfl_smpl_hdr_t
;
56
57
/*
58
* Entry header in the sampling buffer. The header is directly followed
59
* with the values of the PMD registers of interest saved in increasing
60
* index order: PMD4, PMD5, and so on. How many PMDs are present depends
61
* on how the session was programmed.
62
*
63
* In the case where multiple counters overflow at the same time, multiple
64
* entries are written consecutively.
65
*
66
* last_reset_value member indicates the initial value of the overflowed PMD.
67
*/
68
typedef
struct
{
69
uint32_t
pid
;
/* thread id (for NPTL, this is gettid()) */
70
uint16_t
ovfl_pmd
;
/* index of pmd that overflowed for this sample */
71
uint16_t
reserved
;
/* for future use */
72
uint64_t
last_reset_val
;
/* initial value of overflowed PMD */
73
uint64_t
ip
;
/* where did the overflow interrupt happened */
74
uint64_t
tstamp
;
/* overflow timetamp */
75
uint16_t
cpu
;
/* cpu on which the overfow occured */
76
uint16_t
set
;
/* event set active when overflow ocurred */
77
uint32_t
tgid
;
/* thread group id (for NPTL, this is getpid()) */
78
}
pfm_dfl_smpl_entry_t
;
79
80
#define PFM_DFL_SMPL_VERSION_MAJ 1U
81
#define PFM_DFL_SMPL_VERSION_MIN 0U
82
#define PFM_DFL_SMPL_VERSION (((PFM_DFL_SMPL_VERSION_MAJ&0xffff)<<16)|(PFM_DFL_SMPL_VERSION_MIN & 0xffff))
83
84
#ifdef __cplusplus
85
};
86
#endif
87
88
#endif
/* __PERFMON_DFL_SMPL_H__ */
perfmon.h
reserved
uint16_t reserved
Definition:
linux-sensors-ppc.h:8
pfm_dfl_smpl_arg_t
Definition:
perfmon_dfl_smpl.h:35
pfm_dfl_smpl_arg_t::res1
uint32_t res1
Definition:
perfmon_dfl_smpl.h:38
pfm_dfl_smpl_arg_t::buf_flags
uint32_t buf_flags
Definition:
perfmon_dfl_smpl.h:37
pfm_dfl_smpl_arg_t::buf_size
uint64_t buf_size
Definition:
perfmon_dfl_smpl.h:36
pfm_dfl_smpl_entry_t
Definition:
perfmon_dfl_smpl.h:68
pfm_dfl_smpl_entry_t::tgid
uint32_t tgid
Definition:
perfmon_dfl_smpl.h:77
pfm_dfl_smpl_entry_t::ip
uint64_t ip
Definition:
perfmon_dfl_smpl.h:73
pfm_dfl_smpl_entry_t::cpu
uint16_t cpu
Definition:
perfmon_dfl_smpl.h:75
pfm_dfl_smpl_entry_t::pid
uint32_t pid
Definition:
perfmon_dfl_smpl.h:69
pfm_dfl_smpl_entry_t::reserved
uint16_t reserved
Definition:
perfmon_dfl_smpl.h:71
pfm_dfl_smpl_entry_t::set
uint16_t set
Definition:
perfmon_dfl_smpl.h:76
pfm_dfl_smpl_entry_t::last_reset_val
uint64_t last_reset_val
Definition:
perfmon_dfl_smpl.h:72
pfm_dfl_smpl_entry_t::tstamp
uint64_t tstamp
Definition:
perfmon_dfl_smpl.h:74
pfm_dfl_smpl_entry_t::ovfl_pmd
uint16_t ovfl_pmd
Definition:
perfmon_dfl_smpl.h:70
pfm_dfl_smpl_hdr_t
Definition:
perfmon_dfl_smpl.h:46
pfm_dfl_smpl_hdr_t::hdr_cur_offs
uint64_t hdr_cur_offs
Definition:
perfmon_dfl_smpl.h:48
pfm_dfl_smpl_hdr_t::hdr_count
uint64_t hdr_count
Definition:
perfmon_dfl_smpl.h:47
pfm_dfl_smpl_hdr_t::hdr_version
uint32_t hdr_version
Definition:
perfmon_dfl_smpl.h:52
pfm_dfl_smpl_hdr_t::hdr_overflows
uint64_t hdr_overflows
Definition:
perfmon_dfl_smpl.h:49
pfm_dfl_smpl_hdr_t::hdr_buf_size
uint64_t hdr_buf_size
Definition:
perfmon_dfl_smpl.h:50
pfm_dfl_smpl_hdr_t::hdr_buf_flags
uint32_t hdr_buf_flags
Definition:
perfmon_dfl_smpl.h:53
pfm_dfl_smpl_hdr_t::hdr_min_buf_space
uint64_t hdr_min_buf_space
Definition:
perfmon_dfl_smpl.h:51
src
libperfnec
include
perfmon
perfmon_dfl_smpl.h
Generated on Wed Dec 20 2023 18:12:52 for PAPI by
1.9.6