Linux Perf
session.c File Reference
#include <errno.h>
#include <inttypes.h>
#include <linux/kernel.h>
#include <traceevent/event-parse.h>
#include <api/fs/fs.h>
#include <byteswap.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>
#include "evlist.h"
#include "evsel.h"
#include "memswap.h"
#include "session.h"
#include "tool.h"
#include "sort.h"
#include "util.h"
#include "cpumap.h"
#include "perf_regs.h"
#include "asm/bug.h"
#include "auxtrace.h"
#include "thread.h"
#include "thread-stack.h"
#include "stat.h"
Include dependency graph for session.c:

Go to the source code of this file.

Macros

#define bswap_safe(f, n)
 
#define bswap_field(f, sz)
 
#define bswap_field_16(f)   bswap_field(f, 16)
 
#define bswap_field_32(f)   bswap_field(f, 32)
 
#define bswap_field_64(f)   bswap_field(f, 64)
 
#define MMAP_SIZE   (32 * 1024 * 1024ULL)
 
#define NUM_MMAPS   128
 

Typedefs

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

Functions

static int perf_session__deliver_event (struct perf_session *session, union perf_event *event, struct perf_tool *tool, u64 file_offset)
 
static int perf_session__open (struct perf_session *session)
 
void perf_session__set_id_hdr_size (struct perf_session *session)
 
int perf_session__create_kernel_maps (struct perf_session *session)
 
static void perf_session__destroy_kernel_maps (struct perf_session *session)
 
static bool perf_session__has_comm_exec (struct perf_session *session)
 
static void perf_session__set_comm_exec (struct perf_session *session)
 
static int ordered_events__deliver_event (struct ordered_events *oe, struct ordered_event *event)
 
struct perf_sessionperf_session__new (struct perf_data *data, bool repipe, struct perf_tool *tool)
 
static void perf_session__delete_threads (struct perf_session *session)
 
void perf_session__delete (struct perf_session *session)
 
static int process_event_synth_tracing_data_stub (struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct perf_session *session __maybe_unused)
 
static int process_event_synth_attr_stub (struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct perf_evlist **pevlist __maybe_unused)
 
static int process_event_synth_event_update_stub (struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct perf_evlist **pevlist __maybe_unused)
 
static int process_event_sample_stub (struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct perf_sample *sample __maybe_unused, struct perf_evsel *evsel __maybe_unused, struct machine *machine __maybe_unused)
 
static int process_event_stub (struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused)
 
static int process_finished_round_stub (struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct ordered_events *oe __maybe_unused)
 
static int process_finished_round (struct perf_tool *tool, union perf_event *event, struct ordered_events *oe)
 
static int skipn (int fd, off_t n)
 
static s64 process_event_auxtrace_stub (struct perf_tool *tool __maybe_unused, union perf_event *event, struct perf_session *session __maybe_unused)
 
static int process_event_op2_stub (struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct perf_session *session __maybe_unused)
 
static int process_event_thread_map_stub (struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct perf_session *session __maybe_unused)
 
static int process_event_cpu_map_stub (struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct perf_session *session __maybe_unused)
 
static int process_event_stat_config_stub (struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct perf_session *session __maybe_unused)
 
static int process_stat_stub (struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct perf_session *perf_session __maybe_unused)
 
static int process_stat_round_stub (struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct perf_session *perf_session __maybe_unused)
 
void perf_tool__fill_defaults (struct perf_tool *tool)
 
static void swap_sample_id_all (union perf_event *event, void *data)
 
static void perf_event__all64_swap (union perf_event *event, bool sample_id_all __maybe_unused)
 
static void perf_event__comm_swap (union perf_event *event, bool sample_id_all)
 
static void perf_event__mmap_swap (union perf_event *event, bool sample_id_all)
 
static void perf_event__mmap2_swap (union perf_event *event, bool sample_id_all)
 
static void perf_event__task_swap (union perf_event *event, bool sample_id_all)
 
static void perf_event__read_swap (union perf_event *event, bool sample_id_all)
 
static void perf_event__aux_swap (union perf_event *event, bool sample_id_all)
 
static void perf_event__itrace_start_swap (union perf_event *event, bool sample_id_all)
 
static void perf_event__switch_swap (union perf_event *event, bool sample_id_all)
 
static void perf_event__throttle_swap (union perf_event *event, bool sample_id_all)
 
static u8 revbyte (u8 b)
 
static void swap_bitfield (u8 *p, unsigned len)
 
void perf_event__attr_swap (struct perf_event_attr *attr)
 
static void perf_event__hdr_attr_swap (union perf_event *event, bool sample_id_all __maybe_unused)
 
static void perf_event__event_update_swap (union perf_event *event, bool sample_id_all __maybe_unused)
 
static void perf_event__event_type_swap (union perf_event *event, bool sample_id_all __maybe_unused)
 
static void perf_event__tracing_data_swap (union perf_event *event, bool sample_id_all __maybe_unused)
 
static void perf_event__auxtrace_info_swap (union perf_event *event, bool sample_id_all __maybe_unused)
 
static void perf_event__auxtrace_swap (union perf_event *event, bool sample_id_all __maybe_unused)
 
static void perf_event__auxtrace_error_swap (union perf_event *event, bool sample_id_all __maybe_unused)
 
static void perf_event__thread_map_swap (union perf_event *event, bool sample_id_all __maybe_unused)
 
static void perf_event__cpu_map_swap (union perf_event *event, bool sample_id_all __maybe_unused)
 
static void perf_event__stat_config_swap (union perf_event *event, bool sample_id_all __maybe_unused)
 
static void perf_event__stat_swap (union perf_event *event, bool sample_id_all __maybe_unused)
 
static void perf_event__stat_round_swap (union perf_event *event, bool sample_id_all __maybe_unused)
 
static int process_finished_round (struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct ordered_events *oe)
 
int perf_session__queue_event (struct perf_session *s, union perf_event *event, u64 timestamp, u64 file_offset)
 
static void callchain__lbr_callstack_printf (struct perf_sample *sample)
 
static void callchain__printf (struct perf_evsel *evsel, struct perf_sample *sample)
 
static void branch_stack__printf (struct perf_sample *sample)
 
static void regs_dump__printf (u64 mask, u64 *regs)
 
static const char * regs_dump_abi (struct regs_dump *d)
 
static void regs__printf (const char *type, struct regs_dump *regs)
 
static void regs_user__printf (struct perf_sample *sample)
 
static void regs_intr__printf (struct perf_sample *sample)
 
static void stack_user__printf (struct stack_dump *dump)
 
static void perf_evlist__print_tstamp (struct perf_evlist *evlist, union perf_event *event, struct perf_sample *sample)
 
static void sample_read__printf (struct perf_sample *sample, u64 read_format)
 
static void dump_event (struct perf_evlist *evlist, union perf_event *event, u64 file_offset, struct perf_sample *sample)
 
static void dump_sample (struct perf_evsel *evsel, union perf_event *event, struct perf_sample *sample)
 
static void dump_read (struct perf_evsel *evsel, union perf_event *event)
 
static struct machinemachines__find_for_cpumode (struct machines *machines, union perf_event *event, struct perf_sample *sample)
 
static int deliver_sample_value (struct perf_evlist *evlist, struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct sample_read_value *v, struct machine *machine)
 
static int deliver_sample_group (struct perf_evlist *evlist, struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
 
static int perf_evlist__deliver_sample (struct perf_evlist *evlist, struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct perf_evsel *evsel, struct machine *machine)
 
static int machines__deliver_event (struct machines *machines, struct perf_evlist *evlist, union perf_event *event, struct perf_sample *sample, struct perf_tool *tool, u64 file_offset)
 
static s64 perf_session__process_user_event (struct perf_session *session, union perf_event *event, u64 file_offset)
 
int perf_session__deliver_synth_event (struct perf_session *session, union perf_event *event, struct perf_sample *sample)
 
static void event_swap (union perf_event *event, bool sample_id_all)
 
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)
 
static s64 perf_session__process_event (struct perf_session *session, union perf_event *event, u64 file_offset)
 
void perf_event_header__bswap (struct perf_event_header *hdr)
 
struct threadperf_session__findnew (struct perf_session *session, pid_t pid)
 
int perf_session__register_idle_thread (struct perf_session *session)
 
static void perf_session__warn_order (const struct perf_session *session)
 
static void perf_session__warn_about_errors (const struct perf_session *session)
 
static int perf_session__flush_thread_stack (struct thread *thread, void *p __maybe_unused)
 
static int perf_session__flush_thread_stacks (struct perf_session *session)
 
static int __perf_session__process_pipe_events (struct perf_session *session)
 
static union perf_eventfetch_mmaped_event (struct perf_session *session, u64 head, size_t mmap_size, char *buf)
 
static int __perf_session__process_events (struct perf_session *session, u64 data_offset, u64 data_size, u64 file_size)
 
int perf_session__process_events (struct perf_session *session)
 
bool perf_session__has_traces (struct perf_session *session, const char *msg)
 
int map__set_kallsyms_ref_reloc_sym (struct map *map, const char *symbol_name, u64 addr)
 
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(skip)(struct dso *dso, int parm), int parm)
 
size_t perf_session__fprintf_nr_events (struct perf_session *session, FILE *fp)
 
size_t perf_session__fprintf (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 *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)
 
int perf_event__process_id_index (struct perf_tool *tool __maybe_unused, 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

static perf_event__swap_op perf_event__swap_ops []
 
static const char * regs_abi []
 
volatile int session_done
 

Macro Definition Documentation

◆ bswap_field

#define bswap_field (   f,
  sz 
)
Value:
do { \
if (bswap_safe(f, 0)) \
attr->f = bswap_##sz(attr->f); \
} while(0)
#define bswap_safe(f, n)
static FILE * f
Definition: intel-pt-log.c:30
Definition: attr.py:1

◆ bswap_field_16

#define bswap_field_16 (   f)    bswap_field(f, 16)

◆ bswap_field_32

#define bswap_field_32 (   f)    bswap_field(f, 32)

◆ bswap_field_64

#define bswap_field_64 (   f)    bswap_field(f, 64)

◆ bswap_safe

#define bswap_safe (   f,
 
)
Value:
(attr->size > (offsetof(struct perf_event_attr, f) + \
sizeof(attr->f) * (n)))
static FILE * f
Definition: intel-pt-log.c:30
Definition: attr.py:1

◆ MMAP_SIZE

#define MMAP_SIZE   (32 * 1024 * 1024ULL)

Definition at line 1819 of file session.c.

◆ NUM_MMAPS

#define NUM_MMAPS   128

Definition at line 1820 of file session.c.

Typedef Documentation

◆ perf_event__swap_op

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

Definition at line 782 of file session.c.

Function Documentation

◆ __perf_session__process_events()

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

Definition at line 1823 of file session.c.

Here is the call graph for this function:

◆ __perf_session__process_pipe_events()

static int __perf_session__process_pipe_events ( struct perf_session session)
static

Definition at line 1683 of file session.c.

Here is the call graph for this function:

◆ __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:

◆ branch_stack__printf()

static void branch_stack__printf ( struct perf_sample sample)
static

Definition at line 936 of file session.c.

◆ callchain__lbr_callstack_printf()

static void callchain__lbr_callstack_printf ( struct perf_sample sample)
static

Definition at line 873 of file session.c.

◆ callchain__printf()

static void callchain__printf ( struct perf_evsel evsel,
struct perf_sample sample 
)
static

Definition at line 920 of file session.c.

Here is the call graph for this function:

◆ deliver_sample_group()

static int deliver_sample_group ( struct perf_evlist evlist,
struct perf_tool tool,
union perf_event event,
struct perf_sample sample,
struct machine machine 
)
static

Definition at line 1201 of file session.c.

Here is the call graph for this function:

◆ deliver_sample_value()

static int deliver_sample_value ( struct perf_evlist evlist,
struct perf_tool tool,
union perf_event event,
struct perf_sample sample,
struct sample_read_value v,
struct machine machine 
)
static

Definition at line 1178 of file session.c.

Here is the call graph for this function:

◆ dump_event()

static void dump_event ( struct perf_evlist evlist,
union perf_event event,
u64  file_offset,
struct perf_sample sample 
)
static

Definition at line 1065 of file session.c.

Here is the call graph for this function:

◆ dump_read()

static void dump_read ( struct perf_evsel evsel,
union perf_event event 
)
static

Definition at line 1128 of file session.c.

Here is the call graph for this function:

◆ dump_sample()

static void dump_sample ( struct perf_evsel evsel,
union perf_event event,
struct perf_sample sample 
)
static

Definition at line 1083 of file session.c.

Here is the call graph for this function:

◆ event_swap()

static void event_swap ( union perf_event event,
bool  sample_id_all 
)
static

Definition at line 1428 of file session.c.

◆ fetch_mmaped_event()

static union perf_event* fetch_mmaped_event ( struct perf_session session,
u64  head,
size_t  mmap_size,
char *  buf 
)
static

Definition at line 1784 of file session.c.

Here is the call graph for this function:

◆ machines__deliver_event()

static int machines__deliver_event ( struct machines machines,
struct perf_evlist evlist,
union perf_event event,
struct perf_sample sample,
struct perf_tool tool,
u64  file_offset 
)
static

Definition at line 1246 of file session.c.

Here is the call graph for this function:

◆ machines__find_for_cpumode()

static struct machine* machines__find_for_cpumode ( struct machines machines,
union perf_event event,
struct perf_sample sample 
)
static

Definition at line 1152 of file session.c.

Here is the call graph for this function:

◆ map__set_kallsyms_ref_reloc_sym()

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

Definition at line 1976 of file session.c.

Here is the call graph for this function:

◆ ordered_events__deliver_event()

static int ordered_events__deliver_event ( struct ordered_events oe,
struct ordered_event event 
)
static

Definition at line 106 of file session.c.

Here is the call graph for this function:

◆ perf_event__all64_swap()

static void perf_event__all64_swap ( union perf_event event,
bool sample_id_all  __maybe_unused 
)
static

Definition at line 439 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__aux_swap()

static void perf_event__aux_swap ( union perf_event event,
bool  sample_id_all 
)
static

Definition at line 520 of file session.c.

Here is the call graph for this function:

◆ perf_event__auxtrace_error_swap()

static void perf_event__auxtrace_error_swap ( union perf_event event,
bool sample_id_all  __maybe_unused 
)
static

Definition at line 696 of file session.c.

◆ perf_event__auxtrace_info_swap()

static void perf_event__auxtrace_info_swap ( union perf_event event,
bool sample_id_all  __maybe_unused 
)
static

Definition at line 673 of file session.c.

Here is the call graph for this function:

◆ perf_event__auxtrace_swap()

static void perf_event__auxtrace_swap ( union perf_event event,
bool sample_id_all  __maybe_unused 
)
static

Definition at line 685 of file session.c.

◆ perf_event__comm_swap()

static void perf_event__comm_swap ( union perf_event event,
bool  sample_id_all 
)
static

Definition at line 446 of file session.c.

Here is the call graph for this function:

◆ perf_event__cpu_map_swap()

static void perf_event__cpu_map_swap ( union perf_event event,
bool sample_id_all  __maybe_unused 
)
static

Definition at line 718 of file session.c.

Here is the call graph for this function:

◆ perf_event__event_type_swap()

static void perf_event__event_type_swap ( union perf_event event,
bool sample_id_all  __maybe_unused 
)
static

Definition at line 660 of file session.c.

◆ perf_event__event_update_swap()

static void perf_event__event_update_swap ( union perf_event event,
bool sample_id_all  __maybe_unused 
)
static

Definition at line 653 of file session.c.

◆ perf_event__hdr_attr_swap()

static void perf_event__hdr_attr_swap ( union perf_event event,
bool sample_id_all  __maybe_unused 
)
static

Definition at line 641 of file session.c.

Here is the call graph for this function:

◆ perf_event__itrace_start_swap()

static void perf_event__itrace_start_swap ( union perf_event event,
bool  sample_id_all 
)
static

Definition at line 530 of file session.c.

Here is the call graph for this function:

◆ perf_event__mmap2_swap()

static void perf_event__mmap2_swap ( union perf_event event,
bool  sample_id_all 
)
static

Definition at line 476 of file session.c.

Here is the call graph for this function:

◆ perf_event__mmap_swap()

static void perf_event__mmap_swap ( union perf_event event,
bool  sample_id_all 
)
static

Definition at line 459 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  __maybe_unused,
union perf_event event,
struct perf_session session 
)

Definition at line 2136 of file session.c.

Here is the call graph for this function:

◆ perf_event__read_swap()

static void perf_event__read_swap ( union perf_event event,
bool  sample_id_all 
)
static

Definition at line 507 of file session.c.

Here is the call graph for this function:

◆ perf_event__stat_config_swap()

static void perf_event__stat_config_swap ( union perf_event event,
bool sample_id_all  __maybe_unused 
)
static

Definition at line 754 of file session.c.

Here is the call graph for this function:

◆ perf_event__stat_round_swap()

static void perf_event__stat_round_swap ( union perf_event event,
bool sample_id_all  __maybe_unused 
)
static

Definition at line 775 of file session.c.

◆ perf_event__stat_swap()

static void perf_event__stat_swap ( union perf_event event,
bool sample_id_all  __maybe_unused 
)
static

Definition at line 764 of file session.c.

◆ perf_event__switch_swap()

static void perf_event__switch_swap ( union perf_event event,
bool  sample_id_all 
)
static

Definition at line 540 of file session.c.

Here is the call graph for this function:

◆ 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__task_swap()

static void perf_event__task_swap ( union perf_event event,
bool  sample_id_all 
)
static

Definition at line 495 of file session.c.

Here is the call graph for this function:

◆ perf_event__thread_map_swap()

static void perf_event__thread_map_swap ( union perf_event event,
bool sample_id_all  __maybe_unused 
)
static

Definition at line 707 of file session.c.

◆ perf_event__throttle_swap()

static void perf_event__throttle_swap ( union perf_event event,
bool  sample_id_all 
)
static

Definition at line 553 of file session.c.

Here is the call graph for this function:

◆ perf_event__tracing_data_swap()

static void perf_event__tracing_data_swap ( union perf_event event,
bool sample_id_all  __maybe_unused 
)
static

Definition at line 667 of file session.c.

◆ perf_event_header__bswap()

void perf_event_header__bswap ( struct perf_event_header *  hdr)

Definition at line 1525 of file session.c.

◆ perf_evlist__deliver_sample()

static int perf_evlist__deliver_sample ( struct perf_evlist evlist,
struct perf_tool tool,
union perf_event event,
struct perf_sample sample,
struct perf_evsel evsel,
struct machine machine 
)
static

Definition at line 1222 of file session.c.

Here is the call graph for this function:

◆ perf_evlist__print_tstamp()

static void perf_evlist__print_tstamp ( struct perf_evlist evlist,
union perf_event event,
struct perf_sample sample 
)
static

Definition at line 1016 of file session.c.

Here is the call graph for this function:

◆ 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__delete_threads()

static void perf_session__delete_threads ( struct perf_session session)
static

Definition at line 182 of file session.c.

Here is the call graph for this function:

◆ perf_session__deliver_event()

static int perf_session__deliver_event ( struct perf_session session,
union perf_event event,
struct perf_tool tool,
u64  file_offset 
)
static

Definition at line 1321 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__destroy_kernel_maps()

static void perf_session__destroy_kernel_maps ( struct perf_session session)
static

Definition at line 82 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__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__flush_thread_stack()

static int perf_session__flush_thread_stack ( struct thread thread,
void *p  __maybe_unused 
)
static

Definition at line 1668 of file session.c.

Here is the call graph for this function:

◆ perf_session__flush_thread_stacks()

static int perf_session__flush_thread_stacks ( struct perf_session session)
static

Definition at line 1674 of file session.c.

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(skip)(struct dso *dso, int parm)  ,
int  parm 
)

Definition at line 2010 of file session.c.

Here is the call graph for this function:

◆ perf_session__fprintf_info()

void perf_session__fprintf_info ( struct perf_session session,
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_comm_exec()

static bool perf_session__has_comm_exec ( struct perf_session session)
static

Definition at line 87 of file session.c.

◆ 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__open()

static int perf_session__open ( struct perf_session session)
static

Definition at line 33 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_event()

static s64 perf_session__process_event ( struct perf_session session,
union perf_event event,
u64  file_offset 
)
static

Definition at line 1492 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__process_user_event()

static s64 perf_session__process_user_event ( struct perf_session session,
union perf_event event,
u64  file_offset 
)
static

Definition at line 1345 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__set_comm_exec()

static void perf_session__set_comm_exec ( struct perf_session session)
static

Definition at line 99 of file session.c.

Here is the call graph for this function:

◆ 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_session__warn_about_errors()

static void perf_session__warn_about_errors ( const struct perf_session session)
static

Definition at line 1576 of file session.c.

Here is the call graph for this function:

◆ perf_session__warn_order()

static void perf_session__warn_order ( const struct perf_session session)
static

Definition at line 1559 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:

◆ process_event_auxtrace_stub()

static s64 process_event_auxtrace_stub ( struct perf_tool *tool  __maybe_unused,
union perf_event event,
struct perf_session *session  __maybe_unused 
)
static

Definition at line 280 of file session.c.

Here is the call graph for this function:

◆ process_event_cpu_map_stub()

static int process_event_cpu_map_stub ( struct perf_tool *tool  __maybe_unused,
union perf_event *event  __maybe_unused,
struct perf_session *session  __maybe_unused 
)
static

Definition at line 313 of file session.c.

Here is the call graph for this function:

◆ process_event_op2_stub()

static int process_event_op2_stub ( struct perf_tool *tool  __maybe_unused,
union perf_event *event  __maybe_unused,
struct perf_session *session  __maybe_unused 
)
static

Definition at line 291 of file session.c.

Here is the call graph for this function:

◆ process_event_sample_stub()

static int process_event_sample_stub ( struct perf_tool *tool  __maybe_unused,
union perf_event *event  __maybe_unused,
struct perf_sample *sample  __maybe_unused,
struct perf_evsel *evsel  __maybe_unused,
struct machine *machine  __maybe_unused 
)
static

Definition at line 234 of file session.c.

Here is the call graph for this function:

◆ process_event_stat_config_stub()

static int process_event_stat_config_stub ( struct perf_tool *tool  __maybe_unused,
union perf_event *event  __maybe_unused,
struct perf_session *session  __maybe_unused 
)
static

Definition at line 325 of file session.c.

Here is the call graph for this function:

◆ process_event_stub()

static int process_event_stub ( struct perf_tool *tool  __maybe_unused,
union perf_event *event  __maybe_unused,
struct perf_sample *sample  __maybe_unused,
struct machine *machine  __maybe_unused 
)
static

Definition at line 244 of file session.c.

Here is the call graph for this function:

◆ process_event_synth_attr_stub()

static int process_event_synth_attr_stub ( struct perf_tool *tool  __maybe_unused,
union perf_event *event  __maybe_unused,
struct perf_evlist **pevlist  __maybe_unused 
)
static

Definition at line 213 of file session.c.

Here is the call graph for this function:

◆ process_event_synth_event_update_stub()

static int process_event_synth_event_update_stub ( struct perf_tool *tool  __maybe_unused,
union perf_event *event  __maybe_unused,
struct perf_evlist **pevlist  __maybe_unused 
)
static

Definition at line 222 of file session.c.

Here is the call graph for this function:

◆ process_event_synth_tracing_data_stub()

static int process_event_synth_tracing_data_stub ( struct perf_tool *tool  __maybe_unused,
union perf_event *event  __maybe_unused,
struct perf_session *session  __maybe_unused 
)
static

Definition at line 202 of file session.c.

Here is the call graph for this function:

◆ process_event_thread_map_stub()

static int process_event_thread_map_stub ( struct perf_tool *tool  __maybe_unused,
union perf_event *event  __maybe_unused,
struct perf_session *session  __maybe_unused 
)
static

Definition at line 301 of file session.c.

Here is the call graph for this function:

◆ process_finished_round() [1/2]

static int process_finished_round ( struct perf_tool tool,
union perf_event event,
struct ordered_events oe 
)
static

◆ process_finished_round() [2/2]

static int process_finished_round ( struct perf_tool *tool  __maybe_unused,
union perf_event *event  __maybe_unused,
struct ordered_events oe 
)
static

Definition at line 858 of file session.c.

Here is the call graph for this function:

◆ process_finished_round_stub()

static int process_finished_round_stub ( struct perf_tool *tool  __maybe_unused,
union perf_event *event  __maybe_unused,
struct ordered_events *oe  __maybe_unused 
)
static

Definition at line 253 of file session.c.

Here is the call graph for this function:

◆ process_stat_round_stub()

static int process_stat_round_stub ( struct perf_tool *tool  __maybe_unused,
union perf_event *event  __maybe_unused,
struct perf_session *perf_session  __maybe_unused 
)
static

Definition at line 348 of file session.c.

Here is the call graph for this function:

◆ process_stat_stub()

static int process_stat_stub ( struct perf_tool *tool  __maybe_unused,
union perf_event *event  __maybe_unused,
struct perf_session *perf_session  __maybe_unused 
)
static

Definition at line 336 of file session.c.

Here is the call graph for this function:

◆ regs__printf()

static void regs__printf ( const char *  type,
struct regs_dump regs 
)
static

Definition at line 982 of file session.c.

Here is the call graph for this function:

◆ regs_dump__printf()

static void regs_dump__printf ( u64  mask,
u64 *  regs 
)
static

Definition at line 956 of file session.c.

Here is the call graph for this function:

◆ regs_dump_abi()

static const char* regs_dump_abi ( struct regs_dump d)
inlinestatic

Definition at line 974 of file session.c.

◆ regs_intr__printf()

static void regs_intr__printf ( struct perf_sample sample)
static

Definition at line 1002 of file session.c.

Here is the call graph for this function:

◆ regs_user__printf()

static void regs_user__printf ( struct perf_sample sample)
static

Definition at line 994 of file session.c.

Here is the call graph for this function:

◆ revbyte()

static u8 revbyte ( u8  b)
static

Definition at line 564 of file session.c.

◆ sample_read__printf()

static void sample_read__printf ( struct perf_sample sample,
u64  read_format 
)
static

Definition at line 1035 of file session.c.

◆ skipn()

static int skipn ( int  fd,
off_t  n 
)
static

Definition at line 265 of file session.c.

◆ stack_user__printf()

static void stack_user__printf ( struct stack_dump dump)
static

Definition at line 1010 of file session.c.

◆ swap_bitfield()

static void swap_bitfield ( u8 *  p,
unsigned  len 
)
static

Definition at line 586 of file session.c.

Here is the call graph for this function:

◆ swap_sample_id_all()

static void swap_sample_id_all ( union perf_event event,
void *  data 
)
static

Definition at line 430 of file session.c.

Here is the call graph for this function:

Variable Documentation

◆ perf_event__swap_ops

perf_event__swap_op perf_event__swap_ops[]
static

Definition at line 785 of file session.c.

◆ regs_abi

const char* regs_abi[]
static
Initial value:
= {
[PERF_SAMPLE_REGS_ABI_NONE] = "none",
[PERF_SAMPLE_REGS_ABI_32] = "32-bit",
[PERF_SAMPLE_REGS_ABI_64] = "64-bit",
}

Definition at line 968 of file session.c.

◆ session_done

volatile int session_done

Definition at line 1681 of file session.c.