Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
session.c File Reference
#include <linux/kernel.h>
#include <byteswap.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>
#include "evlist.h"
#include "evsel.h"
#include "session.h"
#include "tool.h"
#include "sort.h"
#include "util.h"
#include "cpumap.h"
#include "event-parse.h"
#include "perf_regs.h"
#include "unwind.h"
#include "vdso.h"

Go to the source code of this file.

Data Structures

struct  sample_queue
 

Macros

#define _FILE_OFFSET_BITS   64
 
#define NCPUMODES   (sizeof(cpumodes)/sizeof(u8))
 
#define MAX_SAMPLE_BUFFER   (64 * 1024 / sizeof(struct sample_queue))
 
#define session_done()   (*(volatile int *)(&session_done))
 

Typedefs

typedef void(* perf_event__swap_op )(union perf_event *event, bool sample_id_all)
 

Functions

void perf_session__set_id_hdr_size (struct perf_session *session)
 
int perf_session__create_kernel_maps (struct perf_session *self)
 
struct perf_sessionperf_session__new (const char *filename, int mode, bool force, bool repipe, struct perf_tool *tool)
 
void perf_session__delete (struct perf_session *self)
 
void machine__remove_thread (struct machine *self, struct thread *th)
 
struct branch_infomachine__resolve_bstack (struct machine *self, struct thread *thr, struct branch_stack *bs)
 
int machine__resolve_callchain (struct machine *machine, struct perf_evsel *evsel, struct thread *thread, struct perf_sample *sample, struct symbol **parent)
 
void mem_bswap_32 (void *src, int byte_size)
 
void mem_bswap_64 (void *src, int byte_size)
 
void perf_event__attr_swap (struct perf_event_attr *attr)
 
void perf_event_header__bswap (struct perf_event_header *self)
 
struct threadperf_session__findnew (struct perf_session *session, pid_t pid)
 
int __perf_session__process_events (struct perf_session *session, u64 data_offset, u64 data_size, u64 file_size, struct perf_tool *tool)
 
int perf_session__process_events (struct perf_session *self, struct perf_tool *tool)
 
bool perf_session__has_traces (struct perf_session *session, const char *msg)
 
int maps__set_kallsyms_ref_reloc_sym (struct map **maps, const char *symbol_name, u64 addr)
 
size_t perf_session__fprintf_dsos (struct perf_session *self, FILE *fp)
 
size_t perf_session__fprintf_dsos_buildid (struct perf_session *self, FILE *fp, bool with_hits)
 
size_t perf_session__fprintf_nr_events (struct perf_session *session, FILE *fp)
 
size_t perf_session__fprintf (struct perf_session *session, FILE *fp)
 
void perf_session__remove_thread (struct perf_session *session, struct thread *th)
 
struct perf_evselperf_session__find_first_evtype (struct perf_session *session, unsigned int type)
 
void perf_evsel__print_ip (struct perf_evsel *evsel, union perf_event *event, struct perf_sample *sample, struct machine *machine, int print_sym, int print_dso, int print_symoffset)
 
int perf_session__cpu_bitmap (struct perf_session *session, const char *cpu_list, unsigned long *cpu_bitmap)
 
void perf_session__fprintf_info (struct perf_session *session, FILE *fp, bool full)
 
int __perf_session__set_tracepoints_handlers (struct perf_session *session, const struct perf_evsel_str_handler *assocs, size_t nr_assocs)
 

Variables

volatile int session_done
 

Macro Definition Documentation

#define _FILE_OFFSET_BITS   64

Definition at line 1 of file session.c.

#define MAX_SAMPLE_BUFFER   (64 * 1024 / sizeof(struct sample_queue))

Definition at line 853 of file session.c.

#define NCPUMODES   (sizeof(cpumodes)/sizeof(u8))

Definition at line 243 of file session.c.

#define session_done ( )    (*(volatile int *)(&session_done))

Definition at line 1259 of file session.c.

Typedef Documentation

typedef void(* perf_event__swap_op)(union perf_event *event, bool sample_id_all)

Definition at line 662 of file session.c.

Function Documentation

int __perf_session__process_events ( struct perf_session session,
u64  data_offset,
u64  data_size,
u64  file_size,
struct perf_tool tool 
)

Definition at line 1372 of file session.c.

int __perf_session__set_tracepoints_handlers ( struct perf_session session,
const struct perf_evsel_str_handler assocs,
size_t  nr_assocs 
)

Definition at line 1715 of file session.c.

void machine__remove_thread ( struct machine self,
struct thread th 
)

Definition at line 218 of file session.c.

struct branch_info* machine__resolve_bstack ( struct machine self,
struct thread thr,
struct branch_stack bs 
)
read

Definition at line 276 of file session.c.

int machine__resolve_callchain ( struct machine machine,
struct perf_evsel evsel,
struct thread thread,
struct perf_sample sample,
struct symbol **  parent 
)

Definition at line 372 of file session.c.

int maps__set_kallsyms_ref_reloc_sym ( struct map **  maps,
const char symbol_name,
u64  addr 
)

Definition at line 1497 of file session.c.

void mem_bswap_32 ( void src,
int  byte_size 
)

Definition at line 496 of file session.c.

void mem_bswap_64 ( void src,
int  byte_size 
)

Definition at line 506 of file session.c.

void perf_event__attr_swap ( struct perf_event_attr attr)

Definition at line 621 of file session.c.

void perf_event_header__bswap ( struct perf_event_header self)

Definition at line 1195 of file session.c.

void perf_evsel__print_ip ( struct perf_evsel evsel,
union perf_event event,
struct perf_sample sample,
struct machine machine,
int  print_sym,
int  print_dso,
int  print_symoffset 
)

Definition at line 1590 of file session.c.

int perf_session__cpu_bitmap ( struct perf_session session,
const char cpu_list,
unsigned long cpu_bitmap 
)

Definition at line 1654 of file session.c.

int perf_session__create_kernel_maps ( struct perf_session self)

Definition at line 94 of file session.c.

void perf_session__delete ( struct perf_session self)

Definition at line 207 of file session.c.

struct perf_evsel* perf_session__find_first_evtype ( struct perf_session session,
unsigned int  type 
)
read

Definition at line 1578 of file session.c.

struct thread* perf_session__findnew ( struct perf_session session,
pid_t  pid 
)
read

Definition at line 1202 of file session.c.

size_t perf_session__fprintf ( struct perf_session session,
FILE *  fp 
)

Definition at line 1557 of file session.c.

size_t perf_session__fprintf_dsos ( struct perf_session self,
FILE *  fp 
)

Definition at line 1528 of file session.c.

size_t perf_session__fprintf_dsos_buildid ( struct perf_session self,
FILE *  fp,
bool  with_hits 
)

Definition at line 1535 of file session.c.

void perf_session__fprintf_info ( struct perf_session session,
FILE *  fp,
bool  full 
)

Definition at line 1695 of file session.c.

size_t perf_session__fprintf_nr_events ( struct perf_session session,
FILE *  fp 
)

Definition at line 1542 of file session.c.

bool perf_session__has_traces ( struct perf_session session,
const char msg 
)

Definition at line 1487 of file session.c.

struct perf_session* perf_session__new ( const char filename,
int  mode,
bool  force,
bool  repipe,
struct perf_tool tool 
)
read

Definition at line 109 of file session.c.

int perf_session__process_events ( struct perf_session self,
struct perf_tool tool 
)

Definition at line 1468 of file session.c.

void perf_session__remove_thread ( struct perf_session session,
struct thread th 
)

Definition at line 1566 of file session.c.

void perf_session__set_id_hdr_size ( struct perf_session session)

Definition at line 86 of file session.c.

Variable Documentation

volatile int session_done

Definition at line 1260 of file session.c.