Linux Perf
session.h File Reference
#include "trace-event.h"
#include "event.h"
#include "header.h"
#include "machine.h"
#include "data.h"
#include "ordered-events.h"
#include <linux/kernel.h>
#include <linux/rbtree.h>
#include <linux/perf_event.h>
Include dependency graph for session.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  perf_session
 

Macros

#define perf_session__set_tracepoints_handlers(session, array)   __perf_session__set_tracepoints_handlers(session, array, ARRAY_SIZE(array))
 
#define session_done()   READ_ONCE(session_done)
 

Functions

struct perf_sessionperf_session__new (struct perf_data *data, bool repipe, struct perf_tool *tool)
 
void perf_session__delete (struct perf_session *session)
 
void perf_event_header__bswap (struct perf_event_header *hdr)
 
int perf_session__peek_event (struct perf_session *session, off_t file_offset, void *buf, size_t buf_sz, union perf_event **event_ptr, struct perf_sample *sample)
 
int perf_session__process_events (struct perf_session *session)
 
int perf_session__queue_event (struct perf_session *s, union perf_event *event, u64 timestamp, u64 file_offset)
 
void perf_tool__fill_defaults (struct perf_tool *tool)
 
int perf_session__resolve_callchain (struct perf_session *session, struct perf_evsel *evsel, struct thread *thread, struct ip_callchain *chain, struct symbol **parent)
 
bool perf_session__has_traces (struct perf_session *session, const char *msg)
 
void perf_event__attr_swap (struct perf_event_attr *attr)
 
int perf_session__create_kernel_maps (struct perf_session *session)
 
void perf_session__set_id_hdr_size (struct perf_session *session)
 
static struct machineperf_session__find_machine (struct perf_session *session, pid_t pid)
 
static struct machineperf_session__findnew_machine (struct perf_session *session, pid_t pid)
 
struct threadperf_session__findnew (struct perf_session *session, pid_t pid)
 
int perf_session__register_idle_thread (struct perf_session *session)
 
size_t perf_session__fprintf (struct perf_session *session, FILE *fp)
 
size_t perf_session__fprintf_dsos (struct perf_session *session, FILE *fp)
 
size_t perf_session__fprintf_dsos_buildid (struct perf_session *session, FILE *fp, bool(fn)(struct dso *dso, int parm), int parm)
 
size_t perf_session__fprintf_nr_events (struct perf_session *session, FILE *fp)
 
struct perf_evselperf_session__find_first_evtype (struct perf_session *session, unsigned int type)
 
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 *s, 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)
 
int perf_session__deliver_synth_event (struct perf_session *session, union perf_event *event, struct perf_sample *sample)
 
int perf_event__process_id_index (struct perf_tool *tool, union perf_event *event, struct perf_session *session)
 
int perf_event__synthesize_id_index (struct perf_tool *tool, perf_event__handler_t process, struct perf_evlist *evlist, struct machine *machine)
 

Variables

volatile int session_done
 

Macro Definition Documentation

◆ perf_session__set_tracepoints_handlers

#define perf_session__set_tracepoints_handlers (   session,
  array 
)    __perf_session__set_tracepoints_handlers(session, array, ARRAY_SIZE(array))

Definition at line 112 of file session.h.

◆ session_done

#define session_done ( )    READ_ONCE(session_done)

Definition at line 117 of file session.h.

Function Documentation

◆ __perf_session__set_tracepoints_handlers()

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

Definition at line 2108 of file session.c.

Here is the call graph for this function:

◆ perf_event__attr_swap()

void perf_event__attr_swap ( struct perf_event_attr *  attr)

Definition at line 597 of file session.c.

Here is the call graph for this function:

◆ perf_event__process_id_index()

int perf_event__process_id_index ( struct perf_tool tool,
union perf_event event,
struct perf_session session 
)

◆ perf_event__synthesize_id_index()

int perf_event__synthesize_id_index ( struct perf_tool tool,
perf_event__handler_t  process,
struct perf_evlist evlist,
struct machine machine 
)

Definition at line 2174 of file session.c.

Here is the call graph for this function:

◆ perf_event_header__bswap()

void perf_event_header__bswap ( struct perf_event_header *  hdr)

Definition at line 1525 of file session.c.

◆ perf_session__cpu_bitmap()

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

Definition at line 2051 of file session.c.

Here is the call graph for this function:

◆ perf_session__create_kernel_maps()

int perf_session__create_kernel_maps ( struct perf_session session)

Definition at line 73 of file session.c.

Here is the call graph for this function:

◆ perf_session__delete()

void perf_session__delete ( struct perf_session session)

Definition at line 187 of file session.c.

Here is the call graph for this function:

◆ perf_session__deliver_synth_event()

int perf_session__deliver_synth_event ( struct perf_session session,
union perf_event event,
struct perf_sample sample 
)

Definition at line 1413 of file session.c.

Here is the call graph for this function:

◆ perf_session__find_first_evtype()

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

Definition at line 2039 of file session.c.

◆ perf_session__find_machine()

static struct machine* perf_session__find_machine ( struct perf_session session,
pid_t  pid 
)
static

Definition at line 75 of file session.h.

Here is the call graph for this function:

◆ perf_session__findnew()

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

Definition at line 1532 of file session.c.

Here is the call graph for this function:

◆ perf_session__findnew_machine()

static struct machine* perf_session__findnew_machine ( struct perf_session session,
pid_t  pid 
)
static

Definition at line 81 of file session.h.

Here is the call graph for this function:

◆ perf_session__fprintf()

size_t perf_session__fprintf ( struct perf_session session,
FILE *  fp 
)

Definition at line 2030 of file session.c.

Here is the call graph for this function:

◆ perf_session__fprintf_dsos()

size_t perf_session__fprintf_dsos ( struct perf_session session,
FILE *  fp 
)

Definition at line 2005 of file session.c.

Here is the call graph for this function:

◆ perf_session__fprintf_dsos_buildid()

size_t perf_session__fprintf_dsos_buildid ( struct perf_session session,
FILE *  fp,
bool(fn)(struct dso *dso, int parm)  ,
int  parm 
)

◆ perf_session__fprintf_info()

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

Definition at line 2096 of file session.c.

Here is the call graph for this function:

◆ perf_session__fprintf_nr_events()

size_t perf_session__fprintf_nr_events ( struct perf_session session,
FILE *  fp 
)

Definition at line 2016 of file session.c.

Here is the call graph for this function:

◆ perf_session__has_traces()

bool perf_session__has_traces ( struct perf_session session,
const char *  msg 
)

Definition at line 1963 of file session.c.

◆ perf_session__new()

struct perf_session* perf_session__new ( struct perf_data data,
bool  repipe,
struct perf_tool tool 
)

Definition at line 116 of file session.c.

Here is the call graph for this function:

◆ perf_session__peek_event()

int perf_session__peek_event ( struct perf_session session,
off_t  file_offset,
void *  buf,
size_t  buf_sz,
union perf_event **  event_ptr,
struct perf_sample sample 
)

Definition at line 1437 of file session.c.

Here is the call graph for this function:

◆ perf_session__process_events()

int perf_session__process_events ( struct perf_session session)

Definition at line 1945 of file session.c.

Here is the call graph for this function:

◆ perf_session__queue_event()

int perf_session__queue_event ( struct perf_session s,
union perf_event event,
u64  timestamp,
u64  file_offset 
)

Definition at line 867 of file session.c.

Here is the call graph for this function:

◆ perf_session__register_idle_thread()

int perf_session__register_idle_thread ( struct perf_session session)

Definition at line 1537 of file session.c.

Here is the call graph for this function:

◆ perf_session__resolve_callchain()

int perf_session__resolve_callchain ( struct perf_session session,
struct perf_evsel evsel,
struct thread thread,
struct ip_callchain chain,
struct symbol **  parent 
)

◆ perf_session__set_id_hdr_size()

void perf_session__set_id_hdr_size ( struct perf_session session)

Definition at line 66 of file session.c.

Here is the call graph for this function:

◆ perf_tool__fill_defaults()

void perf_tool__fill_defaults ( struct perf_tool tool)

Definition at line 360 of file session.c.

Here is the call graph for this function:

Variable Documentation

◆ session_done

volatile int session_done

Definition at line 1681 of file session.c.