PAPI 7.1.0.0
Loading...
Searching...
No Matches
pfmlib_crayx2.c
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007 Cray Inc.
3 * Contributed by Steve Kaufmann <sbk@cray.com> based on code from
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
25#include <string.h>
26
27#include <perfmon/pfmlib.h>
29
30#include "pfmlib_priv.h"
31#include "pfmlib_crayx2_priv.h"
32#include "crayx2_events.h"
33
34#define CRAYX2_NO_REDUNDANT 0 /* if>0 an error if chip:ctr:ev repeated */
35
36typedef enum {
37 CTR_REDUNDANT = -2, /* event on counter repeated */
38 CTR_CONFLICT = -1, /* event on counter not the same as previous */
39 CTR_OK = 0 /* event on counter open */
41
42static int
43pfm_crayx2_get_event_code (unsigned int i, unsigned int cnt, int *code)
44{
45 if (cnt != PFMLIB_CNT_FIRST && cnt > crayx2_support.num_cnt) {
46 DPRINT ("return: count %d exceeded #counters\n", cnt);
47 return PFMLIB_ERR_INVAL;
48 } else if (i >= crayx2_support.pme_count) {
49 DPRINT ("return: event index %d exceeded #events\n", i);
50 return PFMLIB_ERR_INVAL;
51 }
52 *code = crayx2_pe[i].pme_code;
53 DPRINT ("return: event code is %#x\n", *code);
54
55 return PFMLIB_SUCCESS;
56}
57
58static char *
60{
61 if (i >= crayx2_support.pme_count) {
62 DPRINT ("return: event index %d exceeded #events\n", i);
63 return NULL;
64 }
65 DPRINT ("return: event name '%s'\n", crayx2_pe[i].pme_name);
66
67 return (char *) crayx2_pe[i].pme_name;
68}
69
70static void
72{
73 unsigned int i;
74
75 memset (counters, 0, sizeof (*counters));
76
77 DPRINT ("event counters for %d counters\n", PMU_CRAYX2_NUM_COUNTERS);
78 for (i=0; i<PMU_CRAYX2_NUM_COUNTERS; i++) {
79 pfm_regmask_set (counters, i);
80 }
81 return;
82}
83
84static int
85pfm_crayx2_chip_use (uint32_t used[ ], unsigned int n)
86{
87 int i, u = 0;
88
89 for (i=0; i<n; i++) {
90 u += pfmlib_popcnt (used[i]);
91 }
92 DPRINT ("number of counters used on chip %d\n", u);
93
94 return u;
95}
96
97static counter_use_t
98pfm_crayx2_counter_use (unsigned int ctr, unsigned int event, uint32_t *used, uint64_t *evmsk)
99{
100 counter_use_t ret = CTR_OK;
101
102 if (*used & (1 << ctr)) {
103 if (event == PFM_EVENT_GET (*evmsk, ctr)) {
104 ret = CTR_REDUNDANT;
105 } else {
106 ret = CTR_CONFLICT;
107 }
108 } else {
109 *evmsk |= PFM_EVENT_SET (ctr, event);
110 *used |= (1 << ctr);
111 }
112 return ret;
113}
114
115static int
116pfm_crayx2_dispatch_events (pfmlib_input_param_t *inp, void *model_in, pfmlib_output_param_t *outp, void *model_out)
117{
118 unsigned int i, npmcs = 0, npmds = 0, base_pmc = 0;
119 uint32_t Pused[PME_CRAYX2_CPU_CHIPS];
120 uint32_t Cused[PME_CRAYX2_CACHE_CHIPS];
121 uint32_t Mused[PME_CRAYX2_MEMORY_CHIPS];
122 uint64_t Pevents = 0, Cevents = 0, Mevents = 0;
123
124 DPRINT ("dispatching event info to the PMCs and PMDs\n");
125
126 /* NOTES:
127 * Multiplexing is not supported on X2.
128 * The priviledge level is ignored for the C and M chips.
129 * The priviledge level is ignored per event.
130 */
131
132 if (PFMLIB_DEBUG ( )) {
133 int j;
134 DPRINT ("input: pfp_event_count %d pfp_dfl_plm %#x pfp_flags %#x\n", inp->pfp_event_count, inp->pfp_dfl_plm, inp->pfp_flags);
135 for (i=0; i<inp->pfp_event_count; i++) {
136 DPRINT (" %3d: event %3d plm %#3x flags %#8lx num_masks %d\n", i, inp->pfp_events[i].event, inp->pfp_events[i].plm, inp->pfp_events[i].flags, inp->pfp_events[i].num_masks);
137 for (j=0; j<inp->pfp_events[i].num_masks; j++) {
138 DPRINT (" unit-mask-%2d: %d\n", j, inp->pfp_events[i].unit_masks[j]);
139 }
140 }
141 }
142
143 /* Better have at least one event specified and not exceed limit.
144 */
145 if (inp->pfp_event_count == 0) {
146 DPRINT ("return: event count is 0\n");
147 return PFMLIB_ERR_INVAL;
148 } else if (inp->pfp_event_count > PMU_CRAYX2_NUM_COUNTERS) {
149 DPRINT ("return: event count exceeds max %d\n", PMU_CRAYX2_NUM_COUNTERS);
150 return PFMLIB_ERR_TOOMANY;
151 }
152
153 memset (Pused, 0, sizeof(Pused));
154 memset (Cused, 0, sizeof(Cused));
155 memset (Mused, 0, sizeof(Mused));
156
157 /* Loop through the input parameters describing the events.
158 */
159 for (i=0; i<inp->pfp_event_count; i++) {
160 unsigned int code, chip, ctr, ev, chipno;
161 counter_use_t ret;
162
163 /* Acquire details describing this event code:
164 * o which substrate/chip it is on
165 * o which counter on the chip
166 * o which event on the counter
167 */
168 code = inp->pfp_events[i].event;
169 chip = crayx2_pe[code].pme_chip;
170 ctr = crayx2_pe[code].pme_ctr;
171 ev = crayx2_pe[code].pme_event;
172 chipno = crayx2_pe[code].pme_chipno;
173
174 DPRINT ("%3d: code %3d chip %1d ctr %2d ev %1d chipno %2d\n", code, i, chip, ctr, ev, chipno);
175
176 /* These priviledge levels are not recognized.
177 */
178 if (inp->pfp_events[i].plm != 0) {
179 DPRINT ("%3d: priviledge level %#x per event not allowed\n", i, inp->pfp_events[i].plm);
180 return PFMLIB_ERR_INVAL;
181 }
182
183 /* No masks exist.
184 */
185 if (inp->pfp_events[i].num_masks > 0) {
186 DPRINT ("too many masks for event\n");
187 return PFMLIB_ERR_TOOMANY;
188 }
189
190 /* The event code. Set-up the event selection mask for
191 * the PMC of the respective chip. Check if more than
192 * one event on the same counter is selected.
193 */
194 if (chip == PME_CRAYX2_CHIP_CPU) {
195 ret = pfm_crayx2_counter_use (ctr, ev, &Pused[chipno], &Pevents);
196 } else if (chip == PME_CRAYX2_CHIP_CACHE) {
197 ret = pfm_crayx2_counter_use (ctr, ev, &Cused[chipno], &Cevents);
198 } else if (chip == PME_CRAYX2_CHIP_MEMORY) {
199 ret = pfm_crayx2_counter_use (ctr, ev, &Mused[chipno], &Mevents);
200 } else {
201 DPRINT ("return: invalid chip\n");
202 return PFMLIB_ERR_INVAL;
203 }
204
205 /* Each chip's counter can only count one event.
206 */
207 if (ret == CTR_CONFLICT) {
208 DPRINT ("return: ctr conflict\n");
210 } else if (ret == CTR_REDUNDANT) {
211#if (CRAYX2_NO_REDUNDANT != 0)
212 DPRINT ("return: ctr redundant\n");
213 return PFMLIB_ERR_EVTMANY;
214#else
215 DPRINT ("warning: ctr redundant\n");
216#endif /* CRAYX2_NO_REDUNDANT */
217 }
218
219 /* Set up the output PMDs.
220 */
221 outp->pfp_pmds[npmds].reg_num = crayx2_pe[code].pme_base + ctr + chipno*crayx2_pe[code].pme_nctrs;
222 outp->pfp_pmds[npmds].reg_addr = 0;
223 outp->pfp_pmds[npmds].reg_alt_addr = 0;
224 outp->pfp_pmds[npmds].reg_value = 0;
225 npmds++;
226 }
227 outp->pfp_pmd_count = npmds;
228
229 if (PFMLIB_DEBUG ( )) {
230 DPRINT ("P event mask %#16lx\n", Pevents);
231 DPRINT ("C event mask %#16lx\n", Cevents);
232 DPRINT ("M event mask %#16lx\n", Mevents);
233 DPRINT ("PMDs: pmd_count %d\n", outp->pfp_pmd_count);
234 for (i=0; i<outp->pfp_pmd_count; i++) {
235 DPRINT (" %3d: reg_value %3lld reg_num %3d reg_addr %#16llx\n", i, outp->pfp_pmds[i].reg_value, outp->pfp_pmds[i].reg_num, outp->pfp_pmds[i].reg_addr);
236 }
237 }
238
239 /* Set up the PMC basics for the chips that will be doing
240 * some counting.
241 */
242 if (pfm_crayx2_chip_use (Pused, PME_CRAYX2_CPU_CHIPS) > 0) {
243 uint64_t Pctrl = PFM_CPU_START;
244 uint64_t Pen = PFM_ENABLE_RW;
245
246 if (inp->pfp_dfl_plm & (PFM_PLM0 | PFM_PLM1)) {
247 Pen |= PFM_ENABLE_KERNEL;
248 }
249 if (inp->pfp_dfl_plm & PFM_PLM2) {
250 Pen |= PFM_ENABLE_EXL;
251 }
252 if (inp->pfp_dfl_plm & PFM_PLM3) {
253 Pen |= PFM_ENABLE_USER;
254 }
255
256 /* First of three CPU PMC registers.
257 */
258 base_pmc = PMU_CRAYX2_CPU_PMC_BASE;
259
260 outp->pfp_pmcs[npmcs].reg_value = Pctrl;
261 outp->pfp_pmcs[npmcs].reg_num = base_pmc + PMC_CONTROL;
262 outp->pfp_pmcs[npmcs].reg_addr = 0;
263 outp->pfp_pmcs[npmcs].reg_alt_addr = 0;
264 npmcs++;
265
266 outp->pfp_pmcs[npmcs].reg_value = Pevents;
267 outp->pfp_pmcs[npmcs].reg_num = base_pmc + PMC_EVENTS;
268 outp->pfp_pmcs[npmcs].reg_addr = 0;
269 outp->pfp_pmcs[npmcs].reg_alt_addr = 0;
270 npmcs++;
271
272 outp->pfp_pmcs[npmcs].reg_value = Pen;
273 outp->pfp_pmcs[npmcs].reg_num = base_pmc + PMC_ENABLE;
274 outp->pfp_pmcs[npmcs].reg_addr = 0;
275 outp->pfp_pmcs[npmcs].reg_alt_addr = 0;
276 npmcs++;
277 }
279 uint64_t Cctrl = PFM_CACHE_START;
280 uint64_t Cen = PFM_ENABLE_RW; /* domains N/A */
281
282 /* Second of three Cache PMC registers.
283 */
284 base_pmc = PMU_CRAYX2_CACHE_PMC_BASE;
285
286 outp->pfp_pmcs[npmcs].reg_value = Cctrl;
287 outp->pfp_pmcs[npmcs].reg_num = base_pmc + PMC_CONTROL;
288 outp->pfp_pmcs[npmcs].reg_addr = 0;
289 outp->pfp_pmcs[npmcs].reg_alt_addr = 0;
290 npmcs++;
291
292 outp->pfp_pmcs[npmcs].reg_value = Cevents;
293 outp->pfp_pmcs[npmcs].reg_num = base_pmc + PMC_EVENTS;
294 outp->pfp_pmcs[npmcs].reg_addr = 0;
295 outp->pfp_pmcs[npmcs].reg_alt_addr = 0;
296 npmcs++;
297
298 outp->pfp_pmcs[npmcs].reg_value = Cen;
299 outp->pfp_pmcs[npmcs].reg_num = base_pmc + PMC_ENABLE;
300 outp->pfp_pmcs[npmcs].reg_addr = 0;
301 outp->pfp_pmcs[npmcs].reg_alt_addr = 0;
302 npmcs++;
303 }
305 uint64_t Mctrl = PFM_MEM_START;
306 uint64_t Men = PFM_ENABLE_RW; /* domains N/A */
307
308 /* Third of three Memory PMC registers.
309 */
311
312 outp->pfp_pmcs[npmcs].reg_value = Mctrl;
313 outp->pfp_pmcs[npmcs].reg_num = base_pmc + PMC_CONTROL;
314 outp->pfp_pmcs[npmcs].reg_addr = 0;
315 outp->pfp_pmcs[npmcs].reg_alt_addr = 0;
316 npmcs++;
317
318 outp->pfp_pmcs[npmcs].reg_value = Mevents;
319 outp->pfp_pmcs[npmcs].reg_num = base_pmc + PMC_EVENTS;
320 outp->pfp_pmcs[npmcs].reg_addr = 0;
321 outp->pfp_pmcs[npmcs].reg_alt_addr = 0;
322 npmcs++;
323
324 outp->pfp_pmcs[npmcs].reg_value = Men;
325 outp->pfp_pmcs[npmcs].reg_num = base_pmc + PMC_ENABLE;
326 outp->pfp_pmcs[npmcs].reg_addr = 0;
327 outp->pfp_pmcs[npmcs].reg_alt_addr = 0;
328 npmcs++;
329 }
330 outp->pfp_pmc_count = npmcs;
331
332 if (PFMLIB_DEBUG ( )) {
333 DPRINT ("PMCs: pmc_count %d\n", outp->pfp_pmc_count);
334 for (i=0; i<outp->pfp_pmc_count; i++) {
335 DPRINT (" %3d: reg_value %#16llx reg_num %3d reg_addr %#16llx\n", i, outp->pfp_pmcs[i].reg_value, outp->pfp_pmcs[i].reg_num, outp->pfp_pmcs[i].reg_addr);
336 }
337 }
338 return PFMLIB_SUCCESS;
339}
340
341static int
343{
344 char buffer[128];
345 int ret;
346
347 DPRINT ("detect the PMU attributes\n");
348
349 ret = __pfm_getcpuinfo_attr ("vendor_id", buffer, sizeof(buffer));
350
351 if (ret != 0 || strcasecmp (buffer, "Cray") != 0) {
352 DPRINT ("return: no 'Cray' vendor_id\n");
353 return PFMLIB_ERR_NOTSUPP;
354 }
355
356 ret = __pfm_getcpuinfo_attr ("type", buffer, sizeof(buffer));
357
358 if (ret != 0 || strcasecmp (buffer, "craynv2") != 0) {
359 DPRINT ("return: no 'craynv2' type\n");
360 return PFMLIB_ERR_NOTSUPP;
361 }
362
363 DPRINT ("Cray X2 nv2 found\n");
364
365 return PFMLIB_SUCCESS;
366}
367
368static void
370{
371 unsigned int i;
372
373 DPRINT ("entered with PMC_COUNT %d\n", PMU_CRAYX2_PMC_COUNT);
374 for (i=0; i<PMU_CRAYX2_PMC_COUNT; i++) {
375 pfm_regmask_set (impl_pmcs, i);
376 }
377
378 return;
379}
380
381static void
383{
384 unsigned int i;
385
386 DPRINT ("entered with PMD_COUNT %d\n", PMU_CRAYX2_PMD_COUNT);
387 for (i=0; i<PMU_CRAYX2_PMD_COUNT; i++) {
388 pfm_regmask_set (impl_pmds, i);
389 }
390
391 return;
392}
393
394static void
396{
397 unsigned int i;
398
399 DPRINT ("entered with NUM_COUNTERS %d\n", PMU_CRAYX2_NUM_COUNTERS);
400 for (i=0; i<PMU_CRAYX2_NUM_COUNTERS; i++) {
401 pfm_regmask_set (impl_counters, i);
402 }
403
404 return;
405}
406
407static void
409{
411 DPRINT ("return: width set to %d\n", *width);
412
413 return;
414}
415
416static int
417pfm_crayx2_get_event_desc (unsigned int ev, char **str)
418{
419 const char *s = crayx2_pe[ev].pme_desc;
420
421 *str = (s == NULL ? NULL : strdup (s));
422 DPRINT ("return: event description is '%s'\n", (s == NULL ? "" : s));
423
424 return PFMLIB_SUCCESS;
425}
426
427static unsigned int
429{
430 DPRINT ("return: #event masks is %d\n", crayx2_pe[ev].pme_numasks);
431 return crayx2_pe[ev].pme_numasks;
432}
433
434static char *
435pfm_crayx2_get_event_mask_name (unsigned int ev, unsigned int midx)
436{
437 DPRINT ("return: event mask name is '%s'\n", crayx2_pe[ev].pme_umasks[midx].pme_uname);
438 return (char *) crayx2_pe[ev].pme_umasks[midx].pme_uname;
439}
440
441static int
442pfm_crayx2_get_event_mask_code (unsigned int ev, unsigned int midx, unsigned int *code)
443{
444 *code = crayx2_pe[ev].pme_umasks[midx].pme_ucode;
445 DPRINT ("return: event mask code is %#x\n", *code);
446
447 return PFMLIB_SUCCESS;
448}
449
450static int
451pfm_crayx2_get_event_mask_desc (unsigned int ev, unsigned int midx, char **str)
452{
453 const char *s = crayx2_pe[ev].pme_umasks[midx].pme_udesc;
454
455 *str = (s == NULL ? NULL : strdup (s));
456 DPRINT ("return: event mask description is '%s'\n", (s == NULL ? "" : s));
457
458 return PFMLIB_SUCCESS;
459}
460
461static int
463{
465 DPRINT ("return: event code for cycles %#x\n", e->event);
466
467 return PFMLIB_SUCCESS;
468}
469
470static int
472{
474 DPRINT ("return: event code for retired instr %#x\n", e->event);
475
476 return PFMLIB_SUCCESS;
477}
478
479
480/* Register the constants and the access functions.
481 */
484 .pmu_type = PFMLIB_CRAYX2_PMU,
485 .pme_count = PME_CRAYX2_EVENT_COUNT,
486 .pmc_count = PMU_CRAYX2_PMC_COUNT,
487 .pmd_count = PMU_CRAYX2_PMD_COUNT,
488 .num_cnt = PMU_CRAYX2_NUM_COUNTERS,
489 .get_event_code = pfm_crayx2_get_event_code,
490 .get_event_name = pfm_crayx2_get_event_name,
491 .get_event_counters = pfm_crayx2_get_event_counters,
492 .dispatch_events = pfm_crayx2_dispatch_events,
493 .pmu_detect = pfm_crayx2_pmu_detect,
494 .get_impl_pmcs = pfm_crayx2_get_impl_pmcs,
495 .get_impl_pmds = pfm_crayx2_get_impl_pmds,
496 .get_impl_counters = pfm_crayx2_get_impl_counters,
497 .get_hw_counter_width = pfm_crayx2_get_hw_counter_width,
498 .get_event_desc = pfm_crayx2_get_event_desc,
499 .get_num_event_masks = pfm_crayx2_get_num_event_masks,
500 .get_event_mask_name = pfm_crayx2_get_event_mask_name,
501 .get_event_mask_code = pfm_crayx2_get_event_mask_code,
502 .get_event_mask_desc = pfm_crayx2_get_event_mask_desc,
503 .get_cycle_event = pfm_crayx2_get_cycle_event,
504 .get_inst_retired_event = pfm_crayx2_get_inst_retired
505};
int i
double s
Definition: byte_profile.c:36
#define PME_CRAYX2_INSTR_GRADUATED
#define PME_CRAYX2_CYCLES
#define PME_CRAYX2_EVENT_COUNT
static pme_crayx2_entry_t crayx2_pe[]
Definition: crayx2_events.h:40
#define PFM_PLM2
Definition: pfmlib.h:52
static int pfm_regmask_set(pfmlib_regmask_t *h, unsigned int b)
Definition: pfmlib.h:321
#define PFMLIB_SUCCESS
Definition: pfmlib.h:283
#define PFM_PLM3
Definition: pfmlib.h:53
#define PFMLIB_ERR_EVTINCOMP
Definition: pfmlib.h:294
#define PFMLIB_ERR_INVAL
Definition: pfmlib.h:285
#define PFMLIB_ERR_TOOMANY
Definition: pfmlib.h:295
#define PFM_PLM0
Definition: pfmlib.h:50
#define PFM_PLM1
Definition: pfmlib.h:51
#define PFMLIB_CRAYX2_PMU
Definition: pfmlib.h:259
#define PFMLIB_ERR_NOTSUPP
Definition: pfmlib.h:284
#define PFMLIB_ERR_EVTMANY
Definition: pfmlib.h:290
#define pfmlib_popcnt
static counter_use_t pfm_crayx2_counter_use(unsigned int ctr, unsigned int event, uint32_t *used, uint64_t *evmsk)
Definition: pfmlib_crayx2.c:98
static void pfm_crayx2_get_event_counters(unsigned int j, pfmlib_regmask_t *counters)
Definition: pfmlib_crayx2.c:71
static void pfm_crayx2_get_hw_counter_width(unsigned int *width)
static int pfm_crayx2_get_event_desc(unsigned int ev, char **str)
static int pfm_crayx2_pmu_detect(void)
static int pfm_crayx2_get_cycle_event(pfmlib_event_t *e)
counter_use_t
Definition: pfmlib_crayx2.c:36
@ CTR_CONFLICT
Definition: pfmlib_crayx2.c:38
@ CTR_REDUNDANT
Definition: pfmlib_crayx2.c:37
@ CTR_OK
Definition: pfmlib_crayx2.c:39
static char * pfm_crayx2_get_event_name(unsigned int i)
Definition: pfmlib_crayx2.c:59
static int pfm_crayx2_get_event_mask_code(unsigned int ev, unsigned int midx, unsigned int *code)
static int pfm_crayx2_get_event_code(unsigned int i, unsigned int cnt, int *code)
Definition: pfmlib_crayx2.c:43
static int pfm_crayx2_get_event_mask_desc(unsigned int ev, unsigned int midx, char **str)
pfm_pmu_support_t crayx2_support
static unsigned int pfm_crayx2_get_num_event_masks(unsigned int ev)
static int pfm_crayx2_get_inst_retired(pfmlib_event_t *e)
static int pfm_crayx2_chip_use(uint32_t used[], unsigned int n)
Definition: pfmlib_crayx2.c:85
static void pfm_crayx2_get_impl_pmds(pfmlib_regmask_t *impl_pmds)
static void pfm_crayx2_get_impl_counters(pfmlib_regmask_t *impl_counters)
static void pfm_crayx2_get_impl_pmcs(pfmlib_regmask_t *impl_pmcs)
static int pfm_crayx2_dispatch_events(pfmlib_input_param_t *inp, void *model_in, pfmlib_output_param_t *outp, void *model_out)
static char * pfm_crayx2_get_event_mask_name(unsigned int ev, unsigned int midx)
#define PMU_CRAYX2_NUM_COUNTERS
#define PMU_CRAYX2_PMC_COUNT
#define PMU_CRAYX2_COUNTER_WIDTH
#define PMU_CRAYX2_NAME
#define PMU_CRAYX2_CPU_PMC_BASE
Definition: pfmlib_crayx2.h:82
#define PMU_CRAYX2_PMD_COUNT
#define PMU_CRAYX2_CACHE_PMC_BASE
Definition: pfmlib_crayx2.h:83
#define PMU_CRAYX2_MEMORY_PMC_BASE
Definition: pfmlib_crayx2.h:84
#define PME_CRAYX2_CHIP_MEMORY
#define PME_CRAYX2_CACHE_CHIPS
#define PME_CRAYX2_CPU_CHIPS
#define PME_CRAYX2_MEMORY_CHIPS
#define PME_CRAYX2_CHIP_CPU
#define PME_CRAYX2_CHIP_CACHE
int __pfm_getcpuinfo_attr(const char *attr, char *ret_buf, size_t maxlen)
#define DPRINT(fmt, a...)
Definition: pfmlib_priv.h:90
#define PFMLIB_DEBUG()
Definition: pfmlib_priv.h:76
#define PFMLIB_CNT_FIRST
Definition: pfmlib_priv.h:62
unsigned int num_cnt
Definition: pfmlib_priv.h:38
unsigned int pme_count
Definition: pfmlib_priv.h:35
unsigned int num_masks
Definition: pfmlib.h:90
unsigned long flags
Definition: pfmlib.h:88
unsigned int plm
Definition: pfmlib.h:87
unsigned int unit_masks[PFMLIB_MAX_MASKS_PER_EVENT]
Definition: pfmlib.h:89
unsigned int event
Definition: pfmlib.h:86
unsigned int pfp_dfl_plm
Definition: pfmlib.h:110
unsigned int pfp_flags
Definition: pfmlib.h:111
pfmlib_event_t pfp_events[PFMLIB_MAX_PMCS]
Definition: pfmlib.h:113
unsigned int pfp_event_count
Definition: pfmlib.h:109
pfmlib_reg_t pfp_pmds[PFMLIB_MAX_PMDS]
Definition: pfmlib.h:130
pfmlib_reg_t pfp_pmcs[PFMLIB_MAX_PMCS]
Definition: pfmlib.h:129
unsigned int pfp_pmc_count
Definition: pfmlib.h:127
unsigned int pfp_pmd_count
Definition: pfmlib.h:128
unsigned long long reg_value
Definition: pfmlib.h:98
unsigned int reg_num
Definition: pfmlib.h:100
unsigned long reg_alt_addr
Definition: pfmlib.h:102
unsigned long long reg_addr
Definition: pfmlib.h:99
unsigned int pme_ctr
pme_crayx2_umask_t pme_umasks[PFMLIB_CRAYX2_MAX_UMASK]
unsigned int pme_numasks
unsigned int pme_chip
unsigned int pme_event
unsigned int pme_base
unsigned int pme_code
unsigned int pme_chipno
unsigned int pme_nctrs
const char * pme_desc
const char * pme_name