Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
evlist.h File Reference
#include <linux/list.h>
#include <stdio.h>
#include "../perf.h"
#include "event.h"
#include "evsel.h"
#include "util.h"
#include <unistd.h>

Go to the source code of this file.

Data Structures

struct  perf_evlist
 
struct  perf_evsel_str_handler
 

Macros

#define PERF_EVLIST__HLIST_BITS   8
 
#define PERF_EVLIST__HLIST_SIZE   (1 << PERF_EVLIST__HLIST_BITS)
 
#define perf_evlist__add_default_attrs(evlist, array)   __perf_evlist__add_default_attrs(evlist, array, ARRAY_SIZE(array))
 

Functions

struct perf_evlistperf_evlist__new (struct cpu_map *cpus, struct thread_map *threads)
 
void perf_evlist__init (struct perf_evlist *evlist, struct cpu_map *cpus, struct thread_map *threads)
 
void perf_evlist__exit (struct perf_evlist *evlist)
 
void perf_evlist__delete (struct perf_evlist *evlist)
 
void perf_evlist__add (struct perf_evlist *evlist, struct perf_evsel *entry)
 
int perf_evlist__add_default (struct perf_evlist *evlist)
 
int __perf_evlist__add_default_attrs (struct perf_evlist *evlist, struct perf_event_attr *attrs, size_t nr_attrs)
 
int perf_evlist__add_newtp (struct perf_evlist *evlist, const char *sys, const char *name, void *handler)
 
int perf_evlist__set_filter (struct perf_evlist *evlist, const char *filter)
 
struct perf_evselperf_evlist__find_tracepoint_by_id (struct perf_evlist *evlist, int id)
 
void perf_evlist__id_add (struct perf_evlist *evlist, struct perf_evsel *evsel, int cpu, int thread, u64 id)
 
void perf_evlist__add_pollfd (struct perf_evlist *evlist, int fd)
 
struct perf_evselperf_evlist__id2evsel (struct perf_evlist *evlist, u64 id)
 
union perf_eventperf_evlist__mmap_read (struct perf_evlist *self, int idx)
 
int perf_evlist__open (struct perf_evlist *evlist)
 
void perf_evlist__config_attrs (struct perf_evlist *evlist, struct perf_record_opts *opts)
 
int perf_evlist__prepare_workload (struct perf_evlist *evlist, struct perf_record_opts *opts, const char *argv[])
 
int perf_evlist__start_workload (struct perf_evlist *evlist)
 
int perf_evlist__mmap (struct perf_evlist *evlist, unsigned int pages, bool overwrite)
 
void perf_evlist__munmap (struct perf_evlist *evlist)
 
void perf_evlist__disable (struct perf_evlist *evlist)
 
void perf_evlist__enable (struct perf_evlist *evlist)
 
void perf_evlist__set_selected (struct perf_evlist *evlist, struct perf_evsel *evsel)
 
int perf_evlist__create_maps (struct perf_evlist *evlist, struct perf_target *target)
 
void perf_evlist__delete_maps (struct perf_evlist *evlist)
 
int perf_evlist__apply_filters (struct perf_evlist *evlist)
 
void __perf_evlist__set_leader (struct list_head *list)
 
void perf_evlist__set_leader (struct perf_evlist *evlist)
 
u64 perf_evlist__sample_type (struct perf_evlist *evlist)
 
bool perf_evlist__sample_id_all (struct perf_evlist *evlist)
 
u16 perf_evlist__id_hdr_size (struct perf_evlist *evlist)
 
int perf_evlist__parse_sample (struct perf_evlist *evlist, union perf_event *event, struct perf_sample *sample)
 
bool perf_evlist__valid_sample_type (struct perf_evlist *evlist)
 
bool perf_evlist__valid_sample_id_all (struct perf_evlist *evlist)
 
void perf_evlist__splice_list_tail (struct perf_evlist *evlist, struct list_head *list, int nr_entries)
 
size_t perf_evlist__fprintf (struct perf_evlist *evlist, FILE *fp)
 

Macro Definition Documentation

#define perf_evlist__add_default_attrs (   evlist,
  array 
)    __perf_evlist__add_default_attrs(evlist, array, ARRAY_SIZE(array))

Definition at line 57 of file evlist.h.

#define PERF_EVLIST__HLIST_BITS   8

Definition at line 17 of file evlist.h.

#define PERF_EVLIST__HLIST_SIZE   (1 << PERF_EVLIST__HLIST_BITS)

Definition at line 18 of file evlist.h.

Function Documentation

int __perf_evlist__add_default_attrs ( struct perf_evlist evlist,
struct perf_event_attr attrs,
size_t  nr_attrs 
)

Definition at line 181 of file evlist.c.

void __perf_evlist__set_leader ( struct list_head list)

Definition at line 111 of file evlist.c.

void perf_evlist__add ( struct perf_evlist evlist,
struct perf_evsel entry 
)

Definition at line 97 of file evlist.c.

int perf_evlist__add_default ( struct perf_evlist evlist)

Definition at line 130 of file evlist.c.

int perf_evlist__add_newtp ( struct perf_evlist evlist,
const char sys,
const char name,
void handler 
)

Definition at line 206 of file evlist.c.

void perf_evlist__add_pollfd ( struct perf_evlist evlist,
int  fd 
)

Definition at line 255 of file evlist.c.

int perf_evlist__apply_filters ( struct perf_evlist evlist)

Definition at line 601 of file evlist.c.

void perf_evlist__config_attrs ( struct perf_evlist evlist,
struct perf_record_opts opts 
)

Definition at line 52 of file evlist.c.

int perf_evlist__create_maps ( struct perf_evlist evlist,
struct perf_target target 
)

Definition at line 567 of file evlist.c.

void perf_evlist__delete ( struct perf_evlist evlist)

Definition at line 90 of file evlist.c.

void perf_evlist__delete_maps ( struct perf_evlist evlist)

Definition at line 593 of file evlist.c.

void perf_evlist__disable ( struct perf_evlist evlist)

Definition at line 220 of file evlist.c.

void perf_evlist__enable ( struct perf_evlist evlist)

Definition at line 234 of file evlist.c.

void perf_evlist__exit ( struct perf_evlist evlist)

Definition at line 82 of file evlist.c.

struct perf_evsel* perf_evlist__find_tracepoint_by_id ( struct perf_evlist evlist,
int  id 
)
read

Definition at line 193 of file evlist.c.

size_t perf_evlist__fprintf ( struct perf_evlist evlist,
FILE *  fp 
)

Definition at line 832 of file evlist.c.

struct perf_evsel* perf_evlist__id2evsel ( struct perf_evlist evlist,
u64  id 
)
read

Definition at line 303 of file evlist.c.

void perf_evlist__id_add ( struct perf_evlist evlist,
struct perf_evsel evsel,
int  cpu,
int  thread,
u64  id 
)

Definition at line 276 of file evlist.c.

u16 perf_evlist__id_hdr_size ( struct perf_evlist evlist)

Definition at line 654 of file evlist.c.

void perf_evlist__init ( struct perf_evlist evlist,
struct cpu_map cpus,
struct thread_map threads 
)

Definition at line 29 of file evlist.c.

int perf_evlist__mmap ( struct perf_evlist evlist,
unsigned int  pages,
bool  overwrite 
)

perf_evlist__mmap - Create per cpu maps to receive events

- list of events - map length in pages - overwrite older events?

If overwrite is false the user needs to signal event consuption using:

struct perf_mmap *m = &evlist->mmap[cpu]; unsigned int head = perf_mmap__read_head(m);

perf_mmap__write_tail(m, head)

Using perf_evlist__read_on_cpu does this automatically.

Definition at line 528 of file evlist.c.

union perf_event* perf_evlist__mmap_read ( struct perf_evlist self,
int  idx 
)
write

Definition at line 326 of file evlist.c.

void perf_evlist__munmap ( struct perf_evlist evlist)

Definition at line 393 of file evlist.c.

struct perf_evlist* perf_evlist__new ( struct cpu_map cpus,
struct thread_map threads 
)
read

Definition at line 41 of file evlist.c.

int perf_evlist__open ( struct perf_evlist evlist)

Definition at line 708 of file evlist.c.

int perf_evlist__parse_sample ( struct perf_evlist evlist,
union perf_event event,
struct perf_sample sample 
)

Definition at line 825 of file evlist.c.

int perf_evlist__prepare_workload ( struct perf_evlist evlist,
struct perf_record_opts opts,
const char argv[] 
)

Definition at line 731 of file evlist.c.

bool perf_evlist__sample_id_all ( struct perf_evlist evlist)

Definition at line 696 of file evlist.c.

u64 perf_evlist__sample_type ( struct perf_evlist evlist)

Definition at line 648 of file evlist.c.

int perf_evlist__set_filter ( struct perf_evlist evlist,
const char filter 
)

Definition at line 620 of file evlist.c.

void perf_evlist__set_leader ( struct perf_evlist evlist)

Definition at line 124 of file evlist.c.

void perf_evlist__set_selected ( struct perf_evlist evlist,
struct perf_evsel evsel 
)

Definition at line 702 of file evlist.c.

void perf_evlist__splice_list_tail ( struct perf_evlist evlist,
struct list_head list,
int  nr_entries 
)

Definition at line 103 of file evlist.c.

int perf_evlist__start_workload ( struct perf_evlist evlist)

Definition at line 813 of file evlist.c.

bool perf_evlist__valid_sample_id_all ( struct perf_evlist evlist)

Definition at line 684 of file evlist.c.

bool perf_evlist__valid_sample_type ( struct perf_evlist evlist)

Definition at line 636 of file evlist.c.