Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
perf_event_intel.c File Reference
#include <linux/stddef.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <asm/hardirq.h>
#include <asm/apic.h>
#include "perf_event.h"

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define SNB_DMND_DATA_RD   (1ULL << 0)
 
#define SNB_DMND_RFO   (1ULL << 1)
 
#define SNB_DMND_IFETCH   (1ULL << 2)
 
#define SNB_DMND_WB   (1ULL << 3)
 
#define SNB_PF_DATA_RD   (1ULL << 4)
 
#define SNB_PF_RFO   (1ULL << 5)
 
#define SNB_PF_IFETCH   (1ULL << 6)
 
#define SNB_LLC_DATA_RD   (1ULL << 7)
 
#define SNB_LLC_RFO   (1ULL << 8)
 
#define SNB_LLC_IFETCH   (1ULL << 9)
 
#define SNB_BUS_LOCKS   (1ULL << 10)
 
#define SNB_STRM_ST   (1ULL << 11)
 
#define SNB_OTHER   (1ULL << 15)
 
#define SNB_RESP_ANY   (1ULL << 16)
 
#define SNB_NO_SUPP   (1ULL << 17)
 
#define SNB_LLC_HITM   (1ULL << 18)
 
#define SNB_LLC_HITE   (1ULL << 19)
 
#define SNB_LLC_HITS   (1ULL << 20)
 
#define SNB_LLC_HITF   (1ULL << 21)
 
#define SNB_LOCAL   (1ULL << 22)
 
#define SNB_REMOTE   (0xffULL << 23)
 
#define SNB_SNP_NONE   (1ULL << 31)
 
#define SNB_SNP_NOT_NEEDED   (1ULL << 32)
 
#define SNB_SNP_MISS   (1ULL << 33)
 
#define SNB_NO_FWD   (1ULL << 34)
 
#define SNB_SNP_FWD   (1ULL << 35)
 
#define SNB_HITM   (1ULL << 36)
 
#define SNB_NON_DRAM   (1ULL << 37)
 
#define SNB_DMND_READ   (SNB_DMND_DATA_RD|SNB_LLC_DATA_RD)
 
#define SNB_DMND_WRITE   (SNB_DMND_RFO|SNB_LLC_RFO)
 
#define SNB_DMND_PREFETCH   (SNB_PF_DATA_RD|SNB_PF_RFO)
 
#define SNB_SNP_ANY
 
#define SNB_DRAM_ANY   (SNB_LOCAL|SNB_REMOTE|SNB_SNP_ANY)
 
#define SNB_DRAM_REMOTE   (SNB_REMOTE|SNB_SNP_ANY)
 
#define SNB_L3_ACCESS   SNB_RESP_ANY
 
#define SNB_L3_MISS   (SNB_DRAM_ANY|SNB_NON_DRAM)
 
#define NHM_DMND_DATA_RD   (1 << 0)
 
#define NHM_DMND_RFO   (1 << 1)
 
#define NHM_DMND_IFETCH   (1 << 2)
 
#define NHM_DMND_WB   (1 << 3)
 
#define NHM_PF_DATA_RD   (1 << 4)
 
#define NHM_PF_DATA_RFO   (1 << 5)
 
#define NHM_PF_IFETCH   (1 << 6)
 
#define NHM_OFFCORE_OTHER   (1 << 7)
 
#define NHM_UNCORE_HIT   (1 << 8)
 
#define NHM_OTHER_CORE_HIT_SNP   (1 << 9)
 
#define NHM_OTHER_CORE_HITM   (1 << 10)
 
#define NHM_REMOTE_CACHE_FWD   (1 << 12)
 
#define NHM_REMOTE_DRAM   (1 << 13)
 
#define NHM_LOCAL_DRAM   (1 << 14)
 
#define NHM_NON_DRAM   (1 << 15)
 
#define NHM_LOCAL   (NHM_LOCAL_DRAM|NHM_REMOTE_CACHE_FWD)
 
#define NHM_REMOTE   (NHM_REMOTE_DRAM)
 
#define NHM_DMND_READ   (NHM_DMND_DATA_RD)
 
#define NHM_DMND_WRITE   (NHM_DMND_RFO|NHM_DMND_WB)
 
#define NHM_DMND_PREFETCH   (NHM_PF_DATA_RD|NHM_PF_DATA_RFO)
 
#define NHM_L3_HIT   (NHM_UNCORE_HIT|NHM_OTHER_CORE_HIT_SNP|NHM_OTHER_CORE_HITM)
 
#define NHM_L3_MISS   (NHM_NON_DRAM|NHM_LOCAL_DRAM|NHM_REMOTE_DRAM|NHM_REMOTE_CACHE_FWD)
 
#define NHM_L3_ACCESS   (NHM_L3_HIT|NHM_L3_MISS)
 

Functions

int intel_pmu_save_and_restart (struct perf_event *event)
 
struct event_constraintx86_get_event_constraints (struct cpu_hw_events *cpuc, struct perf_event *event)
 
struct perf_guest_switch_msr * perf_guest_get_msrs (int *nr)
 
 EXPORT_SYMBOL_GPL (perf_guest_get_msrs)
 
 PMU_FORMAT_ATTR (event,"config:0-7")
 
 PMU_FORMAT_ATTR (umask,"config:8-15")
 
 PMU_FORMAT_ATTR (edge,"config:18")
 
 PMU_FORMAT_ATTR (pc,"config:19")
 
 PMU_FORMAT_ATTR (any,"config:21")
 
 PMU_FORMAT_ATTR (inv,"config:23")
 
 PMU_FORMAT_ATTR (cmask,"config:24-31")
 
struct intel_shared_regsallocate_shared_regs (int cpu)
 
 PMU_FORMAT_ATTR (offcore_rsp,"config1:0-63")
 
__init int intel_pmu_init (void)
 

Macro Definition Documentation

#define NHM_DMND_DATA_RD   (1 << 0)

Definition at line 451 of file perf_event_intel.c.

#define NHM_DMND_IFETCH   (1 << 2)

Definition at line 453 of file perf_event_intel.c.

#define NHM_DMND_PREFETCH   (NHM_PF_DATA_RD|NHM_PF_DATA_RFO)

Definition at line 473 of file perf_event_intel.c.

#define NHM_DMND_READ   (NHM_DMND_DATA_RD)

Definition at line 471 of file perf_event_intel.c.

#define NHM_DMND_RFO   (1 << 1)

Definition at line 452 of file perf_event_intel.c.

#define NHM_DMND_WB   (1 << 3)

Definition at line 454 of file perf_event_intel.c.

#define NHM_DMND_WRITE   (NHM_DMND_RFO|NHM_DMND_WB)

Definition at line 472 of file perf_event_intel.c.

#define NHM_L3_ACCESS   (NHM_L3_HIT|NHM_L3_MISS)

Definition at line 477 of file perf_event_intel.c.

Definition at line 475 of file perf_event_intel.c.

Definition at line 476 of file perf_event_intel.c.

#define NHM_LOCAL   (NHM_LOCAL_DRAM|NHM_REMOTE_CACHE_FWD)

Definition at line 468 of file perf_event_intel.c.

#define NHM_LOCAL_DRAM   (1 << 14)

Definition at line 465 of file perf_event_intel.c.

#define NHM_NON_DRAM   (1 << 15)

Definition at line 466 of file perf_event_intel.c.

#define NHM_OFFCORE_OTHER   (1 << 7)

Definition at line 458 of file perf_event_intel.c.

#define NHM_OTHER_CORE_HIT_SNP   (1 << 9)

Definition at line 460 of file perf_event_intel.c.

#define NHM_OTHER_CORE_HITM   (1 << 10)

Definition at line 461 of file perf_event_intel.c.

#define NHM_PF_DATA_RD   (1 << 4)

Definition at line 455 of file perf_event_intel.c.

#define NHM_PF_DATA_RFO   (1 << 5)

Definition at line 456 of file perf_event_intel.c.

#define NHM_PF_IFETCH   (1 << 6)

Definition at line 457 of file perf_event_intel.c.

#define NHM_REMOTE   (NHM_REMOTE_DRAM)

Definition at line 469 of file perf_event_intel.c.

#define NHM_REMOTE_CACHE_FWD   (1 << 12)

Definition at line 463 of file perf_event_intel.c.

#define NHM_REMOTE_DRAM   (1 << 13)

Definition at line 464 of file perf_event_intel.c.

#define NHM_UNCORE_HIT   (1 << 8)

Definition at line 459 of file perf_event_intel.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 8 of file perf_event_intel.c.

#define SNB_BUS_LOCKS   (1ULL << 10)

Definition at line 151 of file perf_event_intel.c.

#define SNB_DMND_DATA_RD   (1ULL << 0)

Definition at line 141 of file perf_event_intel.c.

#define SNB_DMND_IFETCH   (1ULL << 2)

Definition at line 143 of file perf_event_intel.c.

#define SNB_DMND_PREFETCH   (SNB_PF_DATA_RD|SNB_PF_RFO)

Definition at line 172 of file perf_event_intel.c.

#define SNB_DMND_READ   (SNB_DMND_DATA_RD|SNB_LLC_DATA_RD)

Definition at line 170 of file perf_event_intel.c.

#define SNB_DMND_RFO   (1ULL << 1)

Definition at line 142 of file perf_event_intel.c.

#define SNB_DMND_WB   (1ULL << 3)

Definition at line 144 of file perf_event_intel.c.

#define SNB_DMND_WRITE   (SNB_DMND_RFO|SNB_LLC_RFO)

Definition at line 171 of file perf_event_intel.c.

#define SNB_DRAM_ANY   (SNB_LOCAL|SNB_REMOTE|SNB_SNP_ANY)

Definition at line 178 of file perf_event_intel.c.

#define SNB_DRAM_REMOTE   (SNB_REMOTE|SNB_SNP_ANY)

Definition at line 179 of file perf_event_intel.c.

#define SNB_HITM   (1ULL << 36)

Definition at line 167 of file perf_event_intel.c.

#define SNB_L3_ACCESS   SNB_RESP_ANY

Definition at line 181 of file perf_event_intel.c.

#define SNB_L3_MISS   (SNB_DRAM_ANY|SNB_NON_DRAM)

Definition at line 182 of file perf_event_intel.c.

#define SNB_LLC_DATA_RD   (1ULL << 7)

Definition at line 148 of file perf_event_intel.c.

#define SNB_LLC_HITE   (1ULL << 19)

Definition at line 157 of file perf_event_intel.c.

#define SNB_LLC_HITF   (1ULL << 21)

Definition at line 159 of file perf_event_intel.c.

#define SNB_LLC_HITM   (1ULL << 18)

Definition at line 156 of file perf_event_intel.c.

#define SNB_LLC_HITS   (1ULL << 20)

Definition at line 158 of file perf_event_intel.c.

#define SNB_LLC_IFETCH   (1ULL << 9)

Definition at line 150 of file perf_event_intel.c.

#define SNB_LLC_RFO   (1ULL << 8)

Definition at line 149 of file perf_event_intel.c.

#define SNB_LOCAL   (1ULL << 22)

Definition at line 160 of file perf_event_intel.c.

#define SNB_NO_FWD   (1ULL << 34)

Definition at line 165 of file perf_event_intel.c.

#define SNB_NO_SUPP   (1ULL << 17)

Definition at line 155 of file perf_event_intel.c.

#define SNB_NON_DRAM   (1ULL << 37)

Definition at line 168 of file perf_event_intel.c.

#define SNB_OTHER   (1ULL << 15)

Definition at line 153 of file perf_event_intel.c.

#define SNB_PF_DATA_RD   (1ULL << 4)

Definition at line 145 of file perf_event_intel.c.

#define SNB_PF_IFETCH   (1ULL << 6)

Definition at line 147 of file perf_event_intel.c.

#define SNB_PF_RFO   (1ULL << 5)

Definition at line 146 of file perf_event_intel.c.

#define SNB_REMOTE   (0xffULL << 23)

Definition at line 161 of file perf_event_intel.c.

#define SNB_RESP_ANY   (1ULL << 16)

Definition at line 154 of file perf_event_intel.c.

#define SNB_SNP_ANY
Value:
SNB_SNP_MISS|SNB_NO_FWD|SNB_SNP_FWD| \
SNB_HITM)

Definition at line 174 of file perf_event_intel.c.

#define SNB_SNP_FWD   (1ULL << 35)

Definition at line 166 of file perf_event_intel.c.

#define SNB_SNP_MISS   (1ULL << 33)

Definition at line 164 of file perf_event_intel.c.

#define SNB_SNP_NONE   (1ULL << 31)

Definition at line 162 of file perf_event_intel.c.

#define SNB_SNP_NOT_NEEDED   (1ULL << 32)

Definition at line 163 of file perf_event_intel.c.

#define SNB_STRM_ST   (1ULL << 11)

Definition at line 152 of file perf_event_intel.c.

Function Documentation

struct intel_shared_regs* allocate_shared_regs ( int  cpu)
read

Definition at line 1633 of file perf_event_intel.c.

EXPORT_SYMBOL_GPL ( perf_guest_get_msrs  )
__init int intel_pmu_init ( void  )

Definition at line 1896 of file perf_event_intel.c.

int intel_pmu_save_and_restart ( struct perf_event event)

Definition at line 1066 of file perf_event_intel.c.

struct perf_guest_switch_msr* perf_guest_get_msrs ( int nr)
read

Definition at line 1508 of file perf_event_intel.c.

PMU_FORMAT_ATTR ( event  ,
"config:0-7"   
)
PMU_FORMAT_ATTR ( umask  ,
"config:8-15"   
)
PMU_FORMAT_ATTR ( edge  ,
"config:18"   
)
PMU_FORMAT_ATTR ( pc  ,
"config:19"   
)
PMU_FORMAT_ATTR ( any  ,
"config:21"   
)
PMU_FORMAT_ATTR ( inv  ,
"config:23"   
)
PMU_FORMAT_ATTR ( cmask  ,
"config:24-31"   
)
PMU_FORMAT_ATTR ( offcore_rsp  ,
"config1:0-63"   
)
struct event_constraint* x86_get_event_constraints ( struct cpu_hw_events cpuc,
struct perf_event event 
)
read

Definition at line 1364 of file perf_event_intel.c.

Variable Documentation

Definition at line 1855 of file perf_event_intel.c.

char* name

Definition at line 1855 of file perf_event_intel.c.