PAPI 7.1.0.0
Loading...
Searching...
No Matches
pfmlib_cell.h
Go to the documentation of this file.
1/*
2 * Cell PMU specific types and definitions
3 *
4 * Copyright (c) 2007 TOSHIBA CORPORATION based on code from
5 * Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
6 * Contributed by Stephane Eranian <eranian@hpl.hp.com>
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 * of the Software, and to permit persons to whom the Software is furnished to do so,
13 * subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in all
16 * copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
19 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
20 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
22 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
23 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 */
25#ifndef __PFMLIB_CELL_H__
26#define __PFMLIB_CELL_H__
27
28#include <perfmon/pfmlib.h>
29
30#define PMU_CELL_NUM_COUNTERS 8 /* total number of EvtSel/EvtCtr */
31#define PMU_CELL_NUM_PERFSEL 8 /* total number of EvtSel */
32#define PMU_CELL_NUM_PERFCTR 8 /* total number of EvtCtr */
33
34typedef struct {
35 unsigned int pmX_control_num; /* for pmX_control X=1(pm0_control)...X=8(pm7_control) */
36 unsigned int spe_subunit;
37 unsigned int polarity;
38 unsigned int input_control;
39 unsigned int cnt_mask; /* threshold (reserved) */
40 unsigned int flags; /* counter specific flag (reserved) */
42
43/*
44 * Cell specific parameters for the library
45 */
46typedef struct {
47 unsigned int triggers;
48 unsigned int interval;
49 unsigned int control;
50 pfmlib_cell_counter_t pfp_cell_counters[PMU_CELL_NUM_COUNTERS]; /* extended counter features */
51 uint64_t reserved[4]; /* for future use */
53
54typedef struct {
55 uint64_t reserved[8]; /* for future use */
57
58int pfm_cell_spe_event(unsigned int event_index);
59
60#endif /* __PFMLIB_CELL_H__ */
uint16_t reserved
#define PMU_CELL_NUM_COUNTERS
Definition: pfmlib_cell.h:30
int pfm_cell_spe_event(unsigned int event_index)
Definition: pfmlib_cell.c:667
unsigned int cnt_mask
Definition: pfmlib_cell.h:39
unsigned int polarity
Definition: pfmlib_cell.h:37
unsigned int input_control
Definition: pfmlib_cell.h:38
unsigned int flags
Definition: pfmlib_cell.h:40
unsigned int pmX_control_num
Definition: pfmlib_cell.h:35
unsigned int spe_subunit
Definition: pfmlib_cell.h:36