Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures
evsel.h File Reference
#include <linux/list.h>
#include <stdbool.h>
#include <stddef.h>
#include <linux/perf_event.h>
#include "types.h"
#include "xyarray.h"
#include "cgroup.h"
#include "hist.h"

Go to the source code of this file.

Data Structures

struct  perf_counts_values
 
struct  perf_counts
 
struct  perf_sample_id
 
struct  perf_evsel
 

- Can be set to retain the original event name passed by the user,

struct perf_evsel - event selector

    so that when showing results in tools such as 'perf stat', we
    show the name used, not some alias.
#define PERF_EVSEL__MAX_ALIASES   8
 
#define perf_evsel__match(evsel, t, c)
 
const charperf_evsel__hw_cache [PERF_COUNT_HW_CACHE_MAX][PERF_EVSEL__MAX_ALIASES]
 
const charperf_evsel__hw_cache_op [PERF_COUNT_HW_CACHE_OP_MAX][PERF_EVSEL__MAX_ALIASES]
 
const charperf_evsel__hw_cache_result [PERF_COUNT_HW_CACHE_RESULT_MAX][PERF_EVSEL__MAX_ALIASES]
 
const charperf_evsel__hw_names [PERF_COUNT_HW_MAX]
 
const charperf_evsel__sw_names [PERF_COUNT_SW_MAX]
 
struct perf_evselperf_evsel__new (struct perf_event_attr *attr, int idx)
 
struct perf_evselperf_evsel__newtp (const char *sys, const char *name, int idx)
 
struct event_formatevent_format__new (const char *sys, const char *name)
 
void perf_evsel__init (struct perf_evsel *evsel, struct perf_event_attr *attr, int idx)
 
void perf_evsel__exit (struct perf_evsel *evsel)
 
void perf_evsel__delete (struct perf_evsel *evsel)
 
void perf_evsel__config (struct perf_evsel *evsel, struct perf_record_opts *opts, struct perf_evsel *first)
 
bool perf_evsel__is_cache_op_valid (u8 type, u8 op)
 
int __perf_evsel__hw_cache_type_op_res_name (u8 type, u8 op, u8 result, char *bf, size_t size)
 
const charperf_evsel__name (struct perf_evsel *evsel)
 
int perf_evsel__alloc_fd (struct perf_evsel *evsel, int ncpus, int nthreads)
 
int perf_evsel__alloc_id (struct perf_evsel *evsel, int ncpus, int nthreads)
 
int perf_evsel__alloc_counts (struct perf_evsel *evsel, int ncpus)
 
void perf_evsel__free_fd (struct perf_evsel *evsel)
 
void perf_evsel__free_id (struct perf_evsel *evsel)
 
void perf_evsel__close_fd (struct perf_evsel *evsel, int ncpus, int nthreads)
 
int perf_evsel__set_filter (struct perf_evsel *evsel, int ncpus, int nthreads, const char *filter)
 
int perf_evsel__open_per_cpu (struct perf_evsel *evsel, struct cpu_map *cpus)
 
int perf_evsel__open_per_thread (struct perf_evsel *evsel, struct thread_map *threads)
 
int perf_evsel__open (struct perf_evsel *evsel, struct cpu_map *cpus, struct thread_map *threads)
 
void perf_evsel__close (struct perf_evsel *evsel, int ncpus, int nthreads)
 
voidperf_evsel__rawptr (struct perf_evsel *evsel, struct perf_sample *sample, const char *name)
 
u64 perf_evsel__intval (struct perf_evsel *evsel, struct perf_sample *sample, const char *name)
 
struct format_fieldperf_evsel__field (struct perf_evsel *evsel, const char *name)
 
int __perf_evsel__read_on_cpu (struct perf_evsel *evsel, int cpu, int thread, bool scale)
 
int __perf_evsel__read (struct perf_evsel *evsel, int ncpus, int nthreads, bool scale)
 
void hists__init (struct hists *hists)
 
int perf_evsel__parse_sample (struct perf_evsel *evsel, union perf_event *event, struct perf_sample *sample)
 

Macro Definition Documentation

#define perf_evsel__match (   evsel,
  t,
  c 
)
Value:
(evsel->attr.type == PERF_TYPE_##t && \
evsel->attr.config == PERF_COUNT_##c)

Definition at line 151 of file evsel.h.

#define PERF_EVSEL__MAX_ALIASES   8

Definition at line 101 of file evsel.h.

Function Documentation

int __perf_evsel__hw_cache_type_op_res_name ( u8  type,
u8  op,
u8  result,
char bf,
size_t  size 
)

Definition at line 312 of file evsel.c.

int __perf_evsel__read ( struct perf_evsel evsel,
int  ncpus,
int  nthreads,
bool  scale 
)

Definition at line 623 of file evsel.c.

int __perf_evsel__read_on_cpu ( struct perf_evsel evsel,
int  cpu,
int  thread,
bool  scale 
)

Definition at line 596 of file evsel.c.

struct event_format* event_format__new ( const char sys,
const char name 
)
read

Definition at line 73 of file evsel.c.

void hists__init ( struct hists hists)

Definition at line 43 of file evsel.c.

int perf_evsel__alloc_counts ( struct perf_evsel evsel,
int  ncpus 
)

Definition at line 545 of file evsel.c.

int perf_evsel__alloc_fd ( struct perf_evsel evsel,
int  ncpus,
int  nthreads 
)

Definition at line 495 of file evsel.c.

int perf_evsel__alloc_id ( struct perf_evsel evsel,
int  ncpus,
int  nthreads 
)

Definition at line 529 of file evsel.c.

void perf_evsel__close ( struct perf_evsel evsel,
int  ncpus,
int  nthreads 
)

Definition at line 737 of file evsel.c.

void perf_evsel__close_fd ( struct perf_evsel evsel,
int  ncpus,
int  nthreads 
)

Definition at line 566 of file evsel.c.

void perf_evsel__config ( struct perf_evsel evsel,
struct perf_record_opts opts,
struct perf_evsel first 
)

Definition at line 407 of file evsel.c.

void perf_evsel__delete ( struct perf_evsel evsel)

Definition at line 585 of file evsel.c.

void perf_evsel__exit ( struct perf_evsel evsel)

Definition at line 577 of file evsel.c.

struct format_field* perf_evsel__field ( struct perf_evsel evsel,
const char name 
)
read

Definition at line 1102 of file evsel.c.

void perf_evsel__free_fd ( struct perf_evsel evsel)

Definition at line 552 of file evsel.c.

void perf_evsel__free_id ( struct perf_evsel evsel)

Definition at line 558 of file evsel.c.

void perf_evsel__init ( struct perf_evsel evsel,
struct perf_event_attr attr,
int  idx 
)

Definition at line 53 of file evsel.c.

u64 perf_evsel__intval ( struct perf_evsel evsel,
struct perf_sample sample,
const char name 
)

Definition at line 1126 of file evsel.c.

bool perf_evsel__is_cache_op_valid ( u8  type,
u8  op 
)

Definition at line 304 of file evsel.c.

const char* perf_evsel__name ( struct perf_evsel evsel)

Definition at line 364 of file evsel.c.

struct perf_evsel* perf_evsel__new ( struct perf_event_attr attr,
int  idx 
)
read

Definition at line 63 of file evsel.c.

struct perf_evsel* perf_evsel__newtp ( const char sys,
const char name,
int  idx 
)
read

Definition at line 114 of file evsel.c.

int perf_evsel__open ( struct perf_evsel evsel,
struct cpu_map cpus,
struct thread_map threads 
)

Definition at line 763 of file evsel.c.

int perf_evsel__open_per_cpu ( struct perf_evsel evsel,
struct cpu_map cpus 
)

Definition at line 777 of file evsel.c.

int perf_evsel__open_per_thread ( struct perf_evsel evsel,
struct thread_map threads 
)

Definition at line 783 of file evsel.c.

int perf_evsel__parse_sample ( struct perf_evsel evsel,
union perf_event event,
struct perf_sample sample 
)

Definition at line 855 of file evsel.c.

void* perf_evsel__rawptr ( struct perf_evsel evsel,
struct perf_sample sample,
const char name 
)

Definition at line 1107 of file evsel.c.

int perf_evsel__set_filter ( struct perf_evsel evsel,
int  ncpus,
int  nthreads,
const char filter 
)

Definition at line 511 of file evsel.c.

Variable Documentation

Definition at line 260 of file evsel.c.

Definition at line 271 of file evsel.c.

Definition at line 278 of file evsel.c.

const char* perf_evsel__hw_names[PERF_COUNT_HW_MAX]

Definition at line 146 of file evsel.c.

const char* perf_evsel__sw_names[PERF_COUNT_SW_MAX]

Definition at line 209 of file evsel.c.