Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations
perf_event.h File Reference
#include <uapi/linux/perf_event.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/rculist.h>
#include <linux/rcupdate.h>
#include <linux/spinlock.h>
#include <linux/hrtimer.h>
#include <linux/fs.h>
#include <linux/pid_namespace.h>
#include <linux/workqueue.h>
#include <linux/ftrace.h>
#include <linux/cpu.h>
#include <linux/irq_work.h>
#include <linux/static_key.h>
#include <linux/atomic.h>
#include <linux/sysfs.h>
#include <linux/perf_regs.h>
#include <asm/local.h>

Go to the source code of this file.

Data Structures

struct  perf_guest_info_callbacks
 
struct  perf_callchain_entry
 
struct  perf_raw_record
 
struct  perf_branch_entry
 
struct  perf_branch_stack
 
struct  perf_regs_user
 
struct  hw_perf_event_extra
 
struct  hw_perf_event
 
struct  pmu
 
struct  swevent_hlist
 
union  perf_event
 
struct  perf_event_context
 
struct  perf_cpu_context
 
struct  perf_output_handle
 

Macros

#define PERF_HES_STOPPED   0x01 /* the counter is stopped */
 
#define PERF_HES_UPTODATE   0x02 /* event->count up-to-date */
 
#define PERF_HES_ARCH   0x04
 
#define PERF_EVENT_TXN   0x1
 
#define PERF_EF_START   0x01 /* start the counter when adding */
 
#define PERF_EF_RELOAD   0x02 /* reload the counter when starting */
 
#define PERF_EF_UPDATE   0x04 /* update the counter when stopping */
 
#define SWEVENT_HLIST_BITS   8
 
#define SWEVENT_HLIST_SIZE   (1 << SWEVENT_HLIST_BITS)
 
#define PERF_ATTACH_CONTEXT   0x01
 
#define PERF_ATTACH_GROUP   0x02
 
#define PERF_ATTACH_TASK   0x04
 
#define PERF_NR_CONTEXTS   4
 
#define perf_output_put(handle, x)   perf_output_copy((handle), &(x), sizeof(x))
 
#define perf_cpu_notifier(fn)
 
#define PMU_FORMAT_ATTR(_name, _format)
 

Typedefs

typedef void(* perf_overflow_handler_t )(struct perf_event *, struct perf_sample_data *, struct pt_regs *regs)
 

Enumerations

enum  perf_event_active_state { PERF_EVENT_STATE_ERROR = -2, PERF_EVENT_STATE_OFF = -1, PERF_EVENT_STATE_INACTIVE = 0, PERF_EVENT_STATE_ACTIVE = 1 }
 
enum  perf_group_flag { PERF_GROUP_SOFTWARE = 0x1 }
 
enum  perf_event_context_type { task_context, cpu_context }
 

Macro Definition Documentation

#define PERF_ATTACH_CONTEXT   0x01

Definition at line 293 of file perf_event.h.

#define PERF_ATTACH_GROUP   0x02

Definition at line 294 of file perf_event.h.

#define PERF_ATTACH_TASK   0x04

Definition at line 295 of file perf_event.h.

#define perf_cpu_notifier (   fn)
Value:
do { \
static struct notifier_block fn##_nb __cpuinitdata = \
{ .notifier_call = fn, .priority = CPU_PRI_PERF }; \
unsigned long cpu = smp_processor_id(); \
unsigned long flags; \
fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \
(void *)(unsigned long)cpu); \
local_irq_save(flags); \
fn(&fn##_nb, (unsigned long)CPU_STARTING, \
(void *)(unsigned long)cpu); \
local_irq_restore(flags); \
fn(&fn##_nb, (unsigned long)CPU_ONLINE, \
(void *)(unsigned long)cpu); \
register_cpu_notifier(&fn##_nb); \
} while (0)

Definition at line 802 of file perf_event.h.

#define PERF_EF_RELOAD   0x02 /* reload the counter when starting */

Definition at line 207 of file perf_event.h.

#define PERF_EF_START   0x01 /* start the counter when adding */

Definition at line 206 of file perf_event.h.

#define PERF_EF_UPDATE   0x04 /* update the counter when stopping */

Definition at line 208 of file perf_event.h.

#define PERF_EVENT_TXN   0x1

Definition at line 176 of file perf_event.h.

#define PERF_HES_ARCH   0x04

Definition at line 169 of file perf_event.h.

#define PERF_HES_STOPPED   0x01 /* the counter is stopped */

Definition at line 167 of file perf_event.h.

#define PERF_HES_UPTODATE   0x02 /* event->count up-to-date */

Definition at line 168 of file perf_event.h.

#define PERF_NR_CONTEXTS   4

Definition at line 504 of file perf_event.h.

#define perf_output_put (   handle,
  x 
)    perf_output_copy((handle), &(x), sizeof(x))

Definition at line 797 of file perf_event.h.

#define PMU_FORMAT_ATTR (   _name,
  _format 
)
Value:
static ssize_t \
_name##_show(struct device *dev, \
char *page) \
{ \
BUILD_BUG_ON(sizeof(_format) >= PAGE_SIZE); \
return sprintf(page, _format "\n"); \
} \
\
static struct device_attribute format_attr_##_name = __ATTR_RO(_name)

Definition at line 820 of file perf_event.h.

#define SWEVENT_HLIST_BITS   8

Definition at line 285 of file perf_event.h.

#define SWEVENT_HLIST_SIZE   (1 << SWEVENT_HLIST_BITS)

Definition at line 286 of file perf_event.h.

Typedef Documentation

typedef void(* perf_overflow_handler_t)(struct perf_event *, struct perf_sample_data *, struct pt_regs *regs)

Definition at line 277 of file perf_event.h.

Enumeration Type Documentation

enum perf_event_active_state - the states of a event

Enumerator:
PERF_EVENT_STATE_ERROR 
PERF_EVENT_STATE_OFF 
PERF_EVENT_STATE_INACTIVE 
PERF_EVENT_STATE_ACTIVE 

Definition at line 267 of file perf_event.h.

Enumerator:
task_context 
cpu_context 

Definition at line 444 of file perf_event.h.

Enumerator:
PERF_GROUP_SOFTWARE 

Definition at line 281 of file perf_event.h.