Linux Kernel
3.7.1
|
#include <linux/oprofile.h>
#include <linux/smp.h>
#include <linux/ptrace.h>
#include <asm/nmi.h>
#include <asm/msr.h>
#include <asm/fixmap.h>
#include <asm/apic.h>
#include "op_x86_model.h"
#include "op_counter.h"
Go to the source code of this file.
Data Structures | |
struct | p4_counter_binding |
struct | p4_event_binding |
Macros | |
#define | NUM_EVENTS 39 |
#define | NUM_COUNTERS_NON_HT 8 |
#define | NUM_ESCRS_NON_HT 45 |
#define | NUM_CCCRS_NON_HT 18 |
#define | NUM_CONTROLS_NON_HT (NUM_ESCRS_NON_HT + NUM_CCCRS_NON_HT) |
#define | NUM_COUNTERS_HT2 4 |
#define | NUM_ESCRS_HT2 23 |
#define | NUM_CCCRS_HT2 9 |
#define | NUM_CONTROLS_HT2 (NUM_ESCRS_HT2 + NUM_CCCRS_HT2) |
#define | OP_CTR_OVERFLOW (1ULL<<31) |
#define | CTR_BPU_0 (1 << 0) |
#define | CTR_MS_0 (1 << 1) |
#define | CTR_FLAME_0 (1 << 2) |
#define | CTR_IQ_4 (1 << 3) |
#define | CTR_BPU_2 (1 << 4) |
#define | CTR_MS_2 (1 << 5) |
#define | CTR_FLAME_2 (1 << 6) |
#define | CTR_IQ_5 (1 << 7) |
#define | NUM_UNUSED_CCCRS (NUM_CCCRS_NON_HT - NUM_COUNTERS_NON_HT) |
#define | MISC_PMC_ENABLED_P(x) ((x) & 1 << 7) |
#define | ESCR_RESERVED_BITS 0x80000003 |
#define | ESCR_CLEAR(escr) ((escr) &= ESCR_RESERVED_BITS) |
#define | ESCR_SET_USR_0(escr, usr) ((escr) |= (((usr) & 1) << 2)) |
#define | ESCR_SET_OS_0(escr, os) ((escr) |= (((os) & 1) << 3)) |
#define | ESCR_SET_USR_1(escr, usr) ((escr) |= (((usr) & 1))) |
#define | ESCR_SET_OS_1(escr, os) ((escr) |= (((os) & 1) << 1)) |
#define | ESCR_SET_EVENT_SELECT(escr, sel) ((escr) |= (((sel) & 0x3f) << 25)) |
#define | ESCR_SET_EVENT_MASK(escr, mask) ((escr) |= (((mask) & 0xffff) << 9)) |
#define | CCCR_RESERVED_BITS 0x38030FFF |
#define | CCCR_CLEAR(cccr) ((cccr) &= CCCR_RESERVED_BITS) |
#define | CCCR_SET_REQUIRED_BITS(cccr) ((cccr) |= 0x00030000) |
#define | CCCR_SET_ESCR_SELECT(cccr, sel) ((cccr) |= (((sel) & 0x07) << 13)) |
#define | CCCR_SET_PMI_OVF_0(cccr) ((cccr) |= (1<<26)) |
#define | CCCR_SET_PMI_OVF_1(cccr) ((cccr) |= (1<<27)) |
#define | CCCR_SET_ENABLE(cccr) ((cccr) |= (1<<12)) |
#define | CCCR_SET_DISABLE(cccr) ((cccr) &= ~(1<<12)) |
#define | CCCR_OVF_P(cccr) ((cccr) & (1U<<31)) |
#define | CCCR_CLEAR_OVF(cccr) ((cccr) &= (~(1U<<31))) |
#define | VIRT_CTR(stagger, i) ((i) + ((num_counters) * (stagger))) |
Variables | |
struct op_x86_model_spec | op_p4_spec |
P4 model-specific MSR operations
Definition in file op_model_p4.c.
#define CCCR_CLEAR | ( | cccr | ) | ((cccr) &= CCCR_RESERVED_BITS) |
Definition at line 357 of file op_model_p4.c.
Definition at line 365 of file op_model_p4.c.
Definition at line 364 of file op_model_p4.c.
#define CCCR_RESERVED_BITS 0x38030FFF |
Definition at line 356 of file op_model_p4.c.
Definition at line 363 of file op_model_p4.c.
Definition at line 362 of file op_model_p4.c.
Definition at line 359 of file op_model_p4.c.
Definition at line 360 of file op_model_p4.c.
Definition at line 361 of file op_model_p4.c.
Definition at line 358 of file op_model_p4.c.
#define CTR_BPU_0 (1 << 0) |
Definition at line 83 of file op_model_p4.c.
#define CTR_BPU_2 (1 << 4) |
Definition at line 87 of file op_model_p4.c.
#define CTR_FLAME_0 (1 << 2) |
Definition at line 85 of file op_model_p4.c.
#define CTR_FLAME_2 (1 << 6) |
Definition at line 89 of file op_model_p4.c.
#define CTR_IQ_4 (1 << 3) |
Definition at line 86 of file op_model_p4.c.
#define CTR_IQ_5 (1 << 7) |
Definition at line 90 of file op_model_p4.c.
#define CTR_MS_0 (1 << 1) |
Definition at line 84 of file op_model_p4.c.
#define CTR_MS_2 (1 << 5) |
Definition at line 88 of file op_model_p4.c.
#define ESCR_CLEAR | ( | escr | ) | ((escr) &= ESCR_RESERVED_BITS) |
Definition at line 348 of file op_model_p4.c.
#define ESCR_RESERVED_BITS 0x80000003 |
Definition at line 347 of file op_model_p4.c.
Definition at line 354 of file op_model_p4.c.
Definition at line 353 of file op_model_p4.c.
Definition at line 350 of file op_model_p4.c.
Definition at line 352 of file op_model_p4.c.
#define ESCR_SET_USR_0 | ( | escr, | |
usr | |||
) | ((escr) |= (((usr) & 1) << 2)) |
Definition at line 349 of file op_model_p4.c.
#define ESCR_SET_USR_1 | ( | escr, | |
usr | |||
) | ((escr) |= (((usr) & 1))) |
Definition at line 351 of file op_model_p4.c.
Definition at line 345 of file op_model_p4.c.
#define NUM_CCCRS_HT2 9 |
Definition at line 32 of file op_model_p4.c.
#define NUM_CCCRS_NON_HT 18 |
Definition at line 27 of file op_model_p4.c.
#define NUM_CONTROLS_HT2 (NUM_ESCRS_HT2 + NUM_CCCRS_HT2) |
Definition at line 33 of file op_model_p4.c.
#define NUM_CONTROLS_NON_HT (NUM_ESCRS_NON_HT + NUM_CCCRS_NON_HT) |
Definition at line 28 of file op_model_p4.c.
#define NUM_COUNTERS_HT2 4 |
Definition at line 30 of file op_model_p4.c.
#define NUM_COUNTERS_NON_HT 8 |
Definition at line 25 of file op_model_p4.c.
#define NUM_ESCRS_HT2 23 |
Definition at line 31 of file op_model_p4.c.
#define NUM_ESCRS_NON_HT 45 |
Definition at line 26 of file op_model_p4.c.
#define NUM_EVENTS 39 |
Definition at line 23 of file op_model_p4.c.
#define NUM_UNUSED_CCCRS (NUM_CCCRS_NON_HT - NUM_COUNTERS_NON_HT) |
Definition at line 103 of file op_model_p4.c.
#define OP_CTR_OVERFLOW (1ULL<<31) |
Definition at line 35 of file op_model_p4.c.
Definition at line 384 of file op_model_p4.c.
struct op_x86_model_spec op_p4_spec |
Definition at line 714 of file op_model_p4.c.