Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
perf_event.c File Reference
#include <linux/perf_event.h>
#include <linux/capability.h>
#include <linux/notifier.h>
#include <linux/hardirq.h>
#include <linux/kprobes.h>
#include <linux/module.h>
#include <linux/kdebug.h>
#include <linux/sched.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
#include <linux/cpu.h>
#include <linux/bitops.h>
#include <linux/device.h>
#include <asm/apic.h>
#include <asm/stacktrace.h>
#include <asm/nmi.h>
#include <asm/smp.h>
#include <asm/alternative.h>
#include <asm/timer.h>
#include <asm/desc.h>
#include <asm/ldt.h>
#include "perf_event.h"

Go to the source code of this file.

Data Structures

struct  sched_state
 
struct  perf_sched
 

Macros

#define SCHED_STATES_MAX   2
 

Functions

 DEFINE_PER_CPU (struct cpu_hw_events, cpu_hw_events)
 
u64 x86_perf_event_update (struct perf_event *event)
 
int x86_setup_perfctr (struct perf_event *event)
 
int x86_pmu_hw_config (struct perf_event *event)
 
void x86_pmu_disable_all (void)
 
void x86_pmu_enable_all (int added)
 
int perf_assign_events (struct event_constraint **constraints, int n, int wmin, int wmax, int *assign)
 
int x86_schedule_events (struct cpu_hw_events *cpuc, int n, int *assign)
 
int x86_perf_event_set_period (struct perf_event *event)
 
void x86_pmu_enable_event (struct perf_event *event)
 
void perf_event_print_debug (void)
 
void x86_pmu_stop (struct perf_event *event, int flags)
 
int x86_pmu_handle_irq (struct pt_regs *regs)
 
void perf_events_lapic_init (void)
 
 early_initcall (init_hw_perf_events)
 
void perf_check_microcode (void)
 
 EXPORT_SYMBOL_GPL (perf_check_microcode)
 
void arch_perf_update_userpage (struct perf_event_mmap_page *userpg, u64 now)
 
void perf_callchain_kernel (struct perf_callchain_entry *entry, struct pt_regs *regs)
 
void perf_callchain_user (struct perf_callchain_entry *entry, struct pt_regs *regs)
 
unsigned long perf_instruction_pointer (struct pt_regs *regs)
 
unsigned long perf_misc_flags (struct pt_regs *regs)
 
void perf_get_x86_pmu_capability (struct x86_pmu_capability *cap)
 
 EXPORT_SYMBOL_GPL (perf_get_x86_pmu_capability)
 

Variables

struct x86_pmu x86_pmu __read_mostly
 
u64 __read_mostly hw_cache_event_ids [PERF_COUNT_HW_CACHE_MAX][PERF_COUNT_HW_CACHE_OP_MAX][PERF_COUNT_HW_CACHE_RESULT_MAX]
 
u64 __read_mostly hw_cache_extra_regs [PERF_COUNT_HW_CACHE_MAX][PERF_COUNT_HW_CACHE_OP_MAX][PERF_COUNT_HW_CACHE_RESULT_MAX]
 
struct event_constraint emptyconstraint
 
struct event_constraint unconstrained
 

Macro Definition Documentation

#define SCHED_STATES_MAX   2

Definition at line 566 of file perf_event.c.

Function Documentation

void arch_perf_update_userpage ( struct perf_event_mmap_page userpg,
u64  now 
)

Definition at line 1692 of file perf_event.c.

DEFINE_PER_CPU ( struct cpu_hw_events  ,
cpu_hw_events   
)
early_initcall ( init_hw_perf_events  )
EXPORT_SYMBOL_GPL ( perf_check_microcode  )
EXPORT_SYMBOL_GPL ( perf_get_x86_pmu_capability  )
int perf_assign_events ( struct event_constraint **  constraints,
int  n,
int  wmin,
int  wmax,
int assign 
)

Definition at line 708 of file perf_event.c.

void perf_callchain_kernel ( struct perf_callchain_entry entry,
struct pt_regs regs 
)

Definition at line 1733 of file perf_event.c.

void perf_callchain_user ( struct perf_callchain_entry entry,
struct pt_regs regs 
)

Definition at line 1819 of file perf_event.c.

void perf_check_microcode ( void  )

Definition at line 1663 of file perf_event.c.

void perf_event_print_debug ( void  )

Definition at line 1074 of file perf_event.c.

void perf_events_lapic_init ( void  )

Definition at line 1238 of file perf_event.c.

void perf_get_x86_pmu_capability ( struct x86_pmu_capability cap)

Definition at line 1930 of file perf_event.c.

unsigned long perf_instruction_pointer ( struct pt_regs regs)

Definition at line 1900 of file perf_event.c.

unsigned long perf_misc_flags ( struct pt_regs regs)

Definition at line 1908 of file perf_event.c.

int x86_perf_event_set_period ( struct perf_event event)

Definition at line 929 of file perf_event.c.

u64 x86_perf_event_update ( struct perf_event event)

Definition at line 60 of file perf_event.c.

void x86_pmu_disable_all ( void  )

Definition at line 493 of file perf_event.c.

void x86_pmu_enable_all ( int  added)

Definition at line 528 of file perf_event.c.

void x86_pmu_enable_event ( struct perf_event event)

Definition at line 989 of file perf_event.c.

int x86_pmu_handle_irq ( struct pt_regs regs)

Definition at line 1181 of file perf_event.c.

int x86_pmu_hw_config ( struct perf_event event)

Definition at line 383 of file perf_event.c.

void x86_pmu_stop ( struct perf_event event,
int  flags 
)

Definition at line 1128 of file perf_event.c.

int x86_schedule_events ( struct cpu_hw_events cpuc,
int  n,
int assign 
)

Definition at line 725 of file perf_event.c.

int x86_setup_perfctr ( struct perf_event event)

Definition at line 290 of file perf_event.c.

Variable Documentation

struct x86_pmu x86_pmu __read_mostly

Definition at line 40 of file perf_event.c.

struct event_constraint emptyconstraint

Definition at line 1258 of file perf_event.c.

Definition at line 49 of file perf_event.c.

Definition at line 53 of file perf_event.c.

struct event_constraint unconstrained

Definition at line 1259 of file perf_event.c.