Linux Perf
machine.c File Reference
#include <dirent.h>
#include <errno.h>
#include <inttypes.h>
#include <regex.h>
#include "callchain.h"
#include "debug.h"
#include "event.h"
#include "evsel.h"
#include "hist.h"
#include "machine.h"
#include "map.h"
#include "sort.h"
#include "strlist.h"
#include "thread.h"
#include "vdso.h"
#include <stdbool.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "unwind.h"
#include "linux/hash.h"
#include "asm/bug.h"
#include "sane_ctype.h"
#include <symbol/kallsyms.h>
#include <linux/mman.h>
Include dependency graph for machine.c:

Go to the source code of this file.

Classes

struct  process_args
 
struct  iterations
 

Macros

#define X86_64_CPU_ENTRY_AREA_PER_CPU   0xfffffe0000000000ULL
 
#define X86_64_CPU_ENTRY_AREA_SIZE   0x2c000
 
#define X86_64_ENTRY_TRAMPOLINE   0x6000
 
#define CHASHSZ   127
 
#define CHASHBITS   7
 
#define NO_ENTRY   0xff
 
#define PERF_MAX_BRANCH_DEPTH   127
 

Functions

static void __machine__remove_thread (struct machine *machine, struct thread *th, bool lock)
 
static void dsos__init (struct dsos *dsos)
 
static void machine__threads_init (struct machine *machine)
 
static int machine__set_mmap_name (struct machine *machine)
 
int machine__init (struct machine *machine, const char *root_dir, pid_t pid)
 
struct machinemachine__new_host (void)
 
struct machinemachine__new_kallsyms (void)
 
static void dsos__purge (struct dsos *dsos)
 
static void dsos__exit (struct dsos *dsos)
 
void machine__delete_threads (struct machine *machine)
 
void machine__exit (struct machine *machine)
 
void machine__delete (struct machine *machine)
 
void machines__init (struct machines *machines)
 
void machines__exit (struct machines *machines)
 
struct machinemachines__add (struct machines *machines, pid_t pid, const char *root_dir)
 
void machines__set_comm_exec (struct machines *machines, bool comm_exec)
 
struct machinemachines__find (struct machines *machines, pid_t pid)
 
struct machinemachines__findnew (struct machines *machines, pid_t pid)
 
void machines__process_guests (struct machines *machines, machine__process_t process, void *data)
 
void machines__set_id_hdr_size (struct machines *machines, u16 id_hdr_size)
 
static void machine__update_thread_pid (struct machine *machine, struct thread *th, pid_t pid)
 
static struct thread____machine__findnew_thread (struct machine *machine, struct threads *threads, pid_t pid, pid_t tid, bool create)
 
struct thread__machine__findnew_thread (struct machine *machine, pid_t pid, pid_t tid)
 
struct threadmachine__findnew_thread (struct machine *machine, pid_t pid, pid_t tid)
 
struct threadmachine__find_thread (struct machine *machine, pid_t pid, pid_t tid)
 
struct commmachine__thread_exec_comm (struct machine *machine, struct thread *thread)
 
int machine__process_comm_event (struct machine *machine, union perf_event *event, struct perf_sample *sample)
 
int machine__process_namespaces_event (struct machine *machine __maybe_unused, union perf_event *event, struct perf_sample *sample __maybe_unused)
 
int machine__process_lost_event (struct machine *machine __maybe_unused, union perf_event *event, struct perf_sample *sample __maybe_unused)
 
int machine__process_lost_samples_event (struct machine *machine __maybe_unused, union perf_event *event, struct perf_sample *sample)
 
static struct dsomachine__findnew_module_dso (struct machine *machine, struct kmod_path *m, const char *filename)
 
int machine__process_aux_event (struct machine *machine __maybe_unused, union perf_event *event)
 
int machine__process_itrace_start_event (struct machine *machine __maybe_unused, union perf_event *event)
 
int machine__process_switch_event (struct machine *machine __maybe_unused, union perf_event *event)
 
static void dso__adjust_kmod_long_name (struct dso *dso, const char *filename)
 
struct mapmachine__findnew_module_map (struct machine *machine, u64 start, const char *filename)
 
size_t machines__fprintf_dsos (struct machines *machines, FILE *fp)
 
size_t machine__fprintf_dsos_buildid (struct machine *m, FILE *fp, bool(skip)(struct dso *dso, int parm), int parm)
 
size_t machines__fprintf_dsos_buildid (struct machines *machines, FILE *fp, bool(skip)(struct dso *dso, int parm), int parm)
 
size_t machine__fprintf_vmlinux_path (struct machine *machine, FILE *fp)
 
size_t machine__fprintf (struct machine *machine, FILE *fp)
 
static struct dsomachine__get_kernel (struct machine *machine)
 
void machine__get_kallsyms_filename (struct machine *machine, char *buf, size_t bufsz)
 
static int machine__get_running_kernel_start (struct machine *machine, const char **symbol_name, u64 *start)
 
int machine__create_extra_kernel_map (struct machine *machine, struct dso *kernel, struct extra_kernel_map *xm)
 
static u64 find_entry_trampoline (struct dso *dso)
 
int machine__map_x86_64_entry_trampolines (struct machine *machine, struct dso *kernel)
 
int __weak machine__create_extra_kernel_maps (struct machine *machine __maybe_unused, struct dso *kernel __maybe_unused)
 
static int __machine__create_kernel_maps (struct machine *machine, struct dso *kernel)
 
void machine__destroy_kernel_maps (struct machine *machine)
 
int machines__create_guest_kernel_maps (struct machines *machines)
 
void machines__destroy_kernel_maps (struct machines *machines)
 
int machines__create_kernel_maps (struct machines *machines, pid_t pid)
 
int machine__load_kallsyms (struct machine *machine, const char *filename)
 
int machine__load_vmlinux_path (struct machine *machine)
 
static char * get_kernel_version (const char *root_dir)
 
static bool is_kmod_dso (struct dso *dso)
 
static int map_groups__set_module_path (struct map_groups *mg, const char *path, struct kmod_path *m)
 
static int map_groups__set_modules_path_dir (struct map_groups *mg, const char *dir_name, int depth)
 
static int machine__set_modules_path (struct machine *machine)
 
int __weak arch__fix_module_text_start (u64 *start __maybe_unused, const char *name __maybe_unused)
 
static int machine__create_module (void *arg, const char *name, u64 start, u64 size)
 
static int machine__create_modules (struct machine *machine)
 
static void machine__set_kernel_mmap (struct machine *machine, u64 start, u64 end)
 
int machine__create_kernel_maps (struct machine *machine)
 
static bool machine__uses_kcore (struct machine *machine)
 
static bool perf_event__is_extra_kernel_mmap (struct machine *machine, union perf_event *event)
 
static int machine__process_extra_kernel_map (struct machine *machine, union perf_event *event)
 
static int machine__process_kernel_mmap_event (struct machine *machine, union perf_event *event)
 
int machine__process_mmap2_event (struct machine *machine, union perf_event *event, struct perf_sample *sample)
 
int machine__process_mmap_event (struct machine *machine, union perf_event *event, struct perf_sample *sample)
 
void machine__remove_thread (struct machine *machine, struct thread *th)
 
int machine__process_fork_event (struct machine *machine, union perf_event *event, struct perf_sample *sample)
 
int machine__process_exit_event (struct machine *machine, union perf_event *event, struct perf_sample *sample __maybe_unused)
 
int machine__process_event (struct machine *machine, union perf_event *event, struct perf_sample *sample)
 
static bool symbol__match_regex (struct symbol *sym, regex_t *regex)
 
static void ip__resolve_ams (struct thread *thread, struct addr_map_symbol *ams, u64 ip)
 
static void ip__resolve_data (struct thread *thread, u8 m, struct addr_map_symbol *ams, u64 addr, u64 phys_addr)
 
struct mem_infosample__resolve_mem (struct perf_sample *sample, struct addr_location *al)
 
static char * callchain_srcline (struct map *map, struct symbol *sym, u64 ip)
 
static int add_callchain_ip (struct thread *thread, struct callchain_cursor *cursor, struct symbol **parent, struct addr_location *root_al, u8 *cpumode, u64 ip, bool branch, struct branch_flags *flags, struct iterations *iter, u64 branch_from)
 
struct branch_infosample__resolve_bstack (struct perf_sample *sample, struct addr_location *al)
 
static void save_iterations (struct iterations *iter, struct branch_entry *be, int nr)
 
static int remove_loops (struct branch_entry *l, int nr, struct iterations *iter)
 
static int resolve_lbr_callchain_sample (struct thread *thread, struct callchain_cursor *cursor, struct perf_sample *sample, struct symbol **parent, struct addr_location *root_al, int max_stack)
 
static int thread__resolve_callchain_sample (struct thread *thread, struct callchain_cursor *cursor, struct perf_evsel *evsel, struct perf_sample *sample, struct symbol **parent, struct addr_location *root_al, int max_stack)
 
static int append_inlines (struct callchain_cursor *cursor, struct map *map, struct symbol *sym, u64 ip)
 
static int unwind_entry (struct unwind_entry *entry, void *arg)
 
static int thread__resolve_callchain_unwind (struct thread *thread, struct callchain_cursor *cursor, struct perf_evsel *evsel, struct perf_sample *sample, int max_stack)
 
int thread__resolve_callchain (struct thread *thread, struct callchain_cursor *cursor, struct perf_evsel *evsel, struct perf_sample *sample, struct symbol **parent, struct addr_location *root_al, int max_stack)
 
int machine__for_each_thread (struct machine *machine, int(*fn)(struct thread *thread, void *p), void *priv)
 
int machines__for_each_thread (struct machines *machines, int(*fn)(struct thread *thread, void *p), void *priv)
 
int __machine__synthesize_threads (struct machine *machine, struct perf_tool *tool, struct target *target, struct thread_map *threads, perf_event__handler_t process, bool data_mmap, unsigned int proc_map_timeout, unsigned int nr_threads_synthesize)
 
pid_t machine__get_current_tid (struct machine *machine, int cpu)
 
int machine__set_current_tid (struct machine *machine, int cpu, pid_t pid, pid_t tid)
 
bool machine__is (struct machine *machine, const char *arch)
 
int machine__nr_cpus_avail (struct machine *machine)
 
int machine__get_kernel_start (struct machine *machine)
 
struct dsomachine__findnew_dso (struct machine *machine, const char *filename)
 
char * machine__resolve_kernel_addr (void *vmachine, unsigned long long *addrp, char **modp)
 

Variables

const char * ref_reloc_sym_names [] = {"_text", "_stext", NULL}
 

Macro Definition Documentation

◆ CHASHBITS

#define CHASHBITS   7

Definition at line 1959 of file machine.c.

◆ CHASHSZ

#define CHASHSZ   127

Definition at line 1958 of file machine.c.

◆ NO_ENTRY

#define NO_ENTRY   0xff

Definition at line 1960 of file machine.c.

◆ PERF_MAX_BRANCH_DEPTH

#define PERF_MAX_BRANCH_DEPTH   127

Definition at line 1962 of file machine.c.

◆ X86_64_CPU_ENTRY_AREA_PER_CPU

#define X86_64_CPU_ENTRY_AREA_PER_CPU   0xfffffe0000000000ULL

Definition at line 910 of file machine.c.

◆ X86_64_CPU_ENTRY_AREA_SIZE

#define X86_64_CPU_ENTRY_AREA_SIZE   0x2c000

Definition at line 911 of file machine.c.

◆ X86_64_ENTRY_TRAMPOLINE

#define X86_64_ENTRY_TRAMPOLINE   0x6000

Definition at line 912 of file machine.c.

Function Documentation

◆ ____machine__findnew_thread()

static struct thread* ____machine__findnew_thread ( struct machine machine,
struct threads threads,
pid_t  pid,
pid_t  tid,
bool  create 
)
static

Definition at line 414 of file machine.c.

Here is the call graph for this function:

◆ __machine__create_kernel_maps()

static int __machine__create_kernel_maps ( struct machine machine,
struct dso kernel 
)
static

Definition at line 979 of file machine.c.

Here is the call graph for this function:

◆ __machine__findnew_thread()

struct thread* __machine__findnew_thread ( struct machine machine,
pid_t  pid,
pid_t  tid 
)

Definition at line 487 of file machine.c.

Here is the call graph for this function:

◆ __machine__remove_thread()

static void __machine__remove_thread ( struct machine machine,
struct thread th,
bool  lock 
)
static

Definition at line 1633 of file machine.c.

Here is the call graph for this function:

◆ __machine__synthesize_threads()

int __machine__synthesize_threads ( struct machine machine,
struct perf_tool tool,
struct target target,
struct thread_map threads,
perf_event__handler_t  process,
bool  data_mmap,
unsigned int  proc_map_timeout,
unsigned int  nr_threads_synthesize 
)

Definition at line 2394 of file machine.c.

Here is the call graph for this function:

◆ add_callchain_ip()

static int add_callchain_ip ( struct thread thread,
struct callchain_cursor cursor,
struct symbol **  parent,
struct addr_location root_al,
u8 *  cpumode,
u64  ip,
bool  branch,
struct branch_flags flags,
struct iterations iter,
u64  branch_from 
)
static

Definition at line 1854 of file machine.c.

Here is the call graph for this function:

◆ append_inlines()

static int append_inlines ( struct callchain_cursor cursor,
struct map map,
struct symbol sym,
u64  ip 
)
static

Definition at line 2238 of file machine.c.

Here is the call graph for this function:

◆ arch__fix_module_text_start()

int __weak arch__fix_module_text_start ( u64 *start  __maybe_unused,
const char *name  __maybe_unused 
)

Definition at line 1257 of file machine.c.

◆ callchain_srcline()

static char* callchain_srcline ( struct map map,
struct symbol sym,
u64  ip 
)
static

Definition at line 1829 of file machine.c.

Here is the call graph for this function:

◆ dso__adjust_kmod_long_name()

static void dso__adjust_kmod_long_name ( struct dso dso,
const char *  filename 
)
static

Definition at line 646 of file machine.c.

Here is the call graph for this function:

◆ dsos__exit()

static void dsos__exit ( struct dsos dsos)
static

Definition at line 168 of file machine.c.

Here is the call graph for this function:

◆ dsos__init()

static void dsos__init ( struct dsos dsos)
static

Definition at line 31 of file machine.c.

Here is the call graph for this function:

◆ dsos__purge()

static void dsos__purge ( struct dsos dsos)
static

Definition at line 152 of file machine.c.

Here is the call graph for this function:

◆ find_entry_trampoline()

static u64 find_entry_trampoline ( struct dso dso)
static

Definition at line 883 of file machine.c.

Here is the call graph for this function:

◆ get_kernel_version()

static char* get_kernel_version ( const char *  root_dir)
static

Definition at line 1124 of file machine.c.

◆ ip__resolve_ams()

static void ip__resolve_ams ( struct thread thread,
struct addr_map_symbol ams,
u64  ip 
)
static

Definition at line 1773 of file machine.c.

Here is the call graph for this function:

◆ ip__resolve_data()

static void ip__resolve_data ( struct thread thread,
u8  m,
struct addr_map_symbol ams,
u64  addr,
u64  phys_addr 
)
static

Definition at line 1796 of file machine.c.

Here is the call graph for this function:

◆ is_kmod_dso()

static bool is_kmod_dso ( struct dso dso)
static

Definition at line 1151 of file machine.c.

◆ machine__create_extra_kernel_map()

int machine__create_extra_kernel_map ( struct machine machine,
struct dso kernel,
struct extra_kernel_map xm 
)

Definition at line 854 of file machine.c.

Here is the call graph for this function:

◆ machine__create_extra_kernel_maps()

int __weak machine__create_extra_kernel_maps ( struct machine *machine  __maybe_unused,
struct dso *kernel  __maybe_unused 
)

Definition at line 972 of file machine.c.

◆ machine__create_kernel_maps()

int machine__create_kernel_maps ( struct machine machine)

Definition at line 1321 of file machine.c.

Here is the call graph for this function:

◆ machine__create_module()

static int machine__create_module ( void *  arg,
const char *  name,
u64  start,
u64  size 
)
static

Definition at line 1263 of file machine.c.

Here is the call graph for this function:

◆ machine__create_modules()

static int machine__create_modules ( struct machine machine)
static

Definition at line 1282 of file machine.c.

Here is the call graph for this function:

◆ machine__delete()

void machine__delete ( struct machine machine)

Definition at line 214 of file machine.c.

Here is the call graph for this function:

◆ machine__delete_threads()

void machine__delete_threads ( struct machine machine)

Definition at line 174 of file machine.c.

Here is the call graph for this function:

◆ machine__destroy_kernel_maps()

void machine__destroy_kernel_maps ( struct machine machine)

Definition at line 1003 of file machine.c.

Here is the call graph for this function:

◆ machine__exit()

void machine__exit ( struct machine machine)

Definition at line 193 of file machine.c.

Here is the call graph for this function:

◆ machine__find_thread()

struct thread* machine__find_thread ( struct machine machine,
pid_t  pid,
pid_t  tid 
)

Definition at line 504 of file machine.c.

Here is the call graph for this function:

◆ machine__findnew_dso()

struct dso* machine__findnew_dso ( struct machine machine,
const char *  filename 
)

Definition at line 2496 of file machine.c.

Here is the call graph for this function:

◆ machine__findnew_module_dso()

static struct dso* machine__findnew_module_dso ( struct machine machine,
struct kmod_path m,
const char *  filename 
)
static

Definition at line 598 of file machine.c.

Here is the call graph for this function:

◆ machine__findnew_module_map()

struct map* machine__findnew_module_map ( struct machine machine,
u64  start,
const char *  filename 
)

Definition at line 664 of file machine.c.

Here is the call graph for this function:

◆ machine__findnew_thread()

struct thread* machine__findnew_thread ( struct machine machine,
pid_t  pid,
pid_t  tid 
)

Definition at line 492 of file machine.c.

Here is the call graph for this function:

◆ machine__for_each_thread()

int machine__for_each_thread ( struct machine machine,
int(*)(struct thread *thread, void *p)  fn,
void *  priv 
)

Definition at line 2345 of file machine.c.

◆ machine__fprintf()

size_t machine__fprintf ( struct machine machine,
FILE *  fp 
)

Definition at line 756 of file machine.c.

Here is the call graph for this function:

◆ machine__fprintf_dsos_buildid()

size_t machine__fprintf_dsos_buildid ( struct machine m,
FILE *  fp,
bool(skip)(struct dso *dso, int parm)  ,
int  parm 
)

Definition at line 717 of file machine.c.

Here is the call graph for this function:

◆ machine__fprintf_vmlinux_path()

size_t machine__fprintf_vmlinux_path ( struct machine machine,
FILE *  fp 
)

Definition at line 736 of file machine.c.

Here is the call graph for this function:

◆ machine__get_current_tid()

pid_t machine__get_current_tid ( struct machine machine,
int  cpu 
)

Definition at line 2411 of file machine.c.

◆ machine__get_kallsyms_filename()

void machine__get_kallsyms_filename ( struct machine machine,
char *  buf,
size_t  bufsz 
)

Definition at line 810 of file machine.c.

Here is the call graph for this function:

◆ machine__get_kernel()

static struct dso* machine__get_kernel ( struct machine machine)
static

Definition at line 780 of file machine.c.

Here is the call graph for this function:

◆ machine__get_kernel_start()

int machine__get_kernel_start ( struct machine machine)

Definition at line 2469 of file machine.c.

Here is the call graph for this function:

◆ machine__get_running_kernel_start()

static int machine__get_running_kernel_start ( struct machine machine,
const char **  symbol_name,
u64 *  start 
)
static

Definition at line 825 of file machine.c.

Here is the call graph for this function:

◆ machine__init()

int machine__init ( struct machine machine,
const char *  root_dir,
pid_t  pid 
)

Definition at line 65 of file machine.c.

Here is the call graph for this function:

◆ machine__is()

bool machine__is ( struct machine machine,
const char *  arch 
)

Definition at line 2459 of file machine.c.

Here is the call graph for this function:

◆ machine__load_kallsyms()

int machine__load_kallsyms ( struct machine machine,
const char *  filename 
)

Definition at line 1095 of file machine.c.

Here is the call graph for this function:

◆ machine__load_vmlinux_path()

int machine__load_vmlinux_path ( struct machine machine)

Definition at line 1113 of file machine.c.

Here is the call graph for this function:

◆ machine__map_x86_64_entry_trampolines()

int machine__map_x86_64_entry_trampolines ( struct machine machine,
struct dso kernel 
)

Definition at line 915 of file machine.c.

Here is the call graph for this function:

◆ machine__new_host()

struct machine* machine__new_host ( void  )

Definition at line 118 of file machine.c.

Here is the call graph for this function:

◆ machine__new_kallsyms()

struct machine* machine__new_kallsyms ( void  )

Definition at line 135 of file machine.c.

Here is the call graph for this function:

◆ machine__nr_cpus_avail()

int machine__nr_cpus_avail ( struct machine machine)

Definition at line 2464 of file machine.c.

Here is the call graph for this function:

◆ machine__process_aux_event()

int machine__process_aux_event ( struct machine *machine  __maybe_unused,
union perf_event event 
)

Definition at line 622 of file machine.c.

Here is the call graph for this function:

◆ machine__process_comm_event()

int machine__process_comm_event ( struct machine machine,
union perf_event event,
struct perf_sample sample 
)

Definition at line 525 of file machine.c.

Here is the call graph for this function:

◆ machine__process_event()

int machine__process_event ( struct machine machine,
union perf_event event,
struct perf_sample sample 
)

Definition at line 1729 of file machine.c.

Here is the call graph for this function:

◆ machine__process_exit_event()

int machine__process_exit_event ( struct machine machine,
union perf_event event,
struct perf_sample *sample  __maybe_unused 
)

Definition at line 1711 of file machine.c.

Here is the call graph for this function:

◆ machine__process_extra_kernel_map()

static int machine__process_extra_kernel_map ( struct machine machine,
union perf_event event 
)
static

Definition at line 1397 of file machine.c.

Here is the call graph for this function:

◆ machine__process_fork_event()

int machine__process_fork_event ( struct machine machine,
union perf_event event,
struct perf_sample sample 
)

Definition at line 1662 of file machine.c.

Here is the call graph for this function:

◆ machine__process_itrace_start_event()

int machine__process_itrace_start_event ( struct machine *machine  __maybe_unused,
union perf_event event 
)

Definition at line 630 of file machine.c.

Here is the call graph for this function:

◆ machine__process_kernel_mmap_event()

static int machine__process_kernel_mmap_event ( struct machine machine,
union perf_event event 
)
static

Definition at line 1416 of file machine.c.

Here is the call graph for this function:

◆ machine__process_lost_event()

int machine__process_lost_event ( struct machine *machine  __maybe_unused,
union perf_event event,
struct perf_sample *sample  __maybe_unused 
)

Definition at line 582 of file machine.c.

Here is the call graph for this function:

◆ machine__process_lost_samples_event()

int machine__process_lost_samples_event ( struct machine *machine  __maybe_unused,
union perf_event event,
struct perf_sample sample 
)

Definition at line 590 of file machine.c.

Here is the call graph for this function:

◆ machine__process_mmap2_event()

int machine__process_mmap2_event ( struct machine machine,
union perf_event event,
struct perf_sample sample 
)

Definition at line 1527 of file machine.c.

Here is the call graph for this function:

◆ machine__process_mmap_event()

int machine__process_mmap_event ( struct machine machine,
union perf_event event,
struct perf_sample sample 
)

Definition at line 1580 of file machine.c.

Here is the call graph for this function:

◆ machine__process_namespaces_event()

int machine__process_namespaces_event ( struct machine *machine  __maybe_unused,
union perf_event event,
struct perf_sample *sample  __maybe_unused 
)

Definition at line 551 of file machine.c.

Here is the call graph for this function:

◆ machine__process_switch_event()

int machine__process_switch_event ( struct machine *machine  __maybe_unused,
union perf_event event 
)

Definition at line 638 of file machine.c.

Here is the call graph for this function:

◆ machine__remove_thread()

void machine__remove_thread ( struct machine machine,
struct thread th 
)

Definition at line 1657 of file machine.c.

Here is the call graph for this function:

◆ machine__resolve_kernel_addr()

char* machine__resolve_kernel_addr ( void *  vmachine,
unsigned long long *  addrp,
char **  modp 
)

Definition at line 2501 of file machine.c.

Here is the call graph for this function:

◆ machine__set_current_tid()

int machine__set_current_tid ( struct machine machine,
int  cpu,
pid_t  pid,
pid_t  tid 
)

Definition at line 2419 of file machine.c.

Here is the call graph for this function:

◆ machine__set_kernel_mmap()

static void machine__set_kernel_mmap ( struct machine machine,
u64  start,
u64  end 
)
static

Definition at line 1308 of file machine.c.

◆ machine__set_mmap_name()

static int machine__set_mmap_name ( struct machine machine)
static

Definition at line 52 of file machine.c.

Here is the call graph for this function:

◆ machine__set_modules_path()

static int machine__set_modules_path ( struct machine machine)
static

Definition at line 1242 of file machine.c.

Here is the call graph for this function:

◆ machine__thread_exec_comm()

struct comm* machine__thread_exec_comm ( struct machine machine,
struct thread thread 
)

Definition at line 516 of file machine.c.

Here is the call graph for this function:

◆ machine__threads_init()

static void machine__threads_init ( struct machine machine)
static

Definition at line 38 of file machine.c.

Here is the call graph for this function:

◆ machine__update_thread_pid()

static void machine__update_thread_pid ( struct machine machine,
struct thread th,
pid_t  pid 
)
static

Definition at line 363 of file machine.c.

Here is the call graph for this function:

◆ machine__uses_kcore()

static bool machine__uses_kcore ( struct machine machine)
static

Definition at line 1378 of file machine.c.

Here is the call graph for this function:

◆ machines__add()

struct machine* machines__add ( struct machines machines,
pid_t  pid,
const char *  root_dir 
)

Definition at line 234 of file machine.c.

Here is the call graph for this function:

◆ machines__create_guest_kernel_maps()

int machines__create_guest_kernel_maps ( struct machines machines)

Definition at line 1021 of file machine.c.

Here is the call graph for this function:

◆ machines__create_kernel_maps()

int machines__create_kernel_maps ( struct machines machines,
pid_t  pid 
)

Definition at line 1085 of file machine.c.

Here is the call graph for this function:

◆ machines__destroy_kernel_maps()

void machines__destroy_kernel_maps ( struct machines machines)

Definition at line 1070 of file machine.c.

Here is the call graph for this function:

◆ machines__exit()

void machines__exit ( struct machines machines)

Definition at line 228 of file machine.c.

Here is the call graph for this function:

◆ machines__find()

struct machine* machines__find ( struct machines machines,
pid_t  pid 
)

Definition at line 277 of file machine.c.

◆ machines__findnew()

struct machine* machines__findnew ( struct machines machines,
pid_t  pid 
)

Definition at line 303 of file machine.c.

Here is the call graph for this function:

◆ machines__for_each_thread()

int machines__for_each_thread ( struct machines machines,
int(*)(struct thread *thread, void *p)  fn,
void *  priv 
)

Definition at line 2373 of file machine.c.

Here is the call graph for this function:

◆ machines__fprintf_dsos()

size_t machines__fprintf_dsos ( struct machines machines,
FILE *  fp 
)

Definition at line 704 of file machine.c.

Here is the call graph for this function:

◆ machines__fprintf_dsos_buildid()

size_t machines__fprintf_dsos_buildid ( struct machines machines,
FILE *  fp,
bool(skip)(struct dso *dso, int parm)  ,
int  parm 
)

Definition at line 723 of file machine.c.

Here is the call graph for this function:

◆ machines__init()

void machines__init ( struct machines machines)

Definition at line 222 of file machine.c.

Here is the call graph for this function:

◆ machines__process_guests()

void machines__process_guests ( struct machines machines,
machine__process_t  process,
void *  data 
)

Definition at line 337 of file machine.c.

◆ machines__set_comm_exec()

void machines__set_comm_exec ( struct machines machines,
bool  comm_exec 
)

Definition at line 264 of file machine.c.

◆ machines__set_id_hdr_size()

void machines__set_id_hdr_size ( struct machines machines,
u16  id_hdr_size 
)

Definition at line 348 of file machine.c.

◆ map_groups__set_module_path()

static int map_groups__set_module_path ( struct map_groups mg,
const char *  path,
struct kmod_path m 
)
static

Definition at line 1157 of file machine.c.

Here is the call graph for this function:

◆ map_groups__set_modules_path_dir()

static int map_groups__set_modules_path_dir ( struct map_groups mg,
const char *  dir_name,
int  depth 
)
static

Definition at line 1183 of file machine.c.

Here is the call graph for this function:

◆ perf_event__is_extra_kernel_mmap()

static bool perf_event__is_extra_kernel_mmap ( struct machine machine,
union perf_event event 
)
static

Definition at line 1390 of file machine.c.

Here is the call graph for this function:

◆ remove_loops()

static int remove_loops ( struct branch_entry l,
int  nr,
struct iterations iter 
)
static

Definition at line 1965 of file machine.c.

Here is the call graph for this function:

◆ resolve_lbr_callchain_sample()

static int resolve_lbr_callchain_sample ( struct thread thread,
struct callchain_cursor cursor,
struct perf_sample sample,
struct symbol **  parent,
struct addr_location root_al,
int  max_stack 
)
static

Definition at line 2017 of file machine.c.

Here is the call graph for this function:

◆ sample__resolve_bstack()

struct branch_info* sample__resolve_bstack ( struct perf_sample sample,
struct addr_location al 
)

Definition at line 1928 of file machine.c.

Here is the call graph for this function:

◆ sample__resolve_mem()

struct mem_info* sample__resolve_mem ( struct perf_sample sample,
struct addr_location al 
)

Definition at line 1813 of file machine.c.

Here is the call graph for this function:

◆ save_iterations()

static void save_iterations ( struct iterations iter,
struct branch_entry be,
int  nr 
)
static

Definition at line 1946 of file machine.c.

◆ symbol__match_regex()

static bool symbol__match_regex ( struct symbol sym,
regex_t *  regex 
)
static

Definition at line 1766 of file machine.c.

◆ thread__resolve_callchain()

int thread__resolve_callchain ( struct thread thread,
struct callchain_cursor cursor,
struct perf_evsel evsel,
struct perf_sample sample,
struct symbol **  parent,
struct addr_location root_al,
int  max_stack 
)

Definition at line 2308 of file machine.c.

Here is the call graph for this function:

◆ thread__resolve_callchain_sample()

static int thread__resolve_callchain_sample ( struct thread thread,
struct callchain_cursor cursor,
struct perf_evsel evsel,
struct perf_sample sample,
struct symbol **  parent,
struct addr_location root_al,
int  max_stack 
)
static

Definition at line 2103 of file machine.c.

Here is the call graph for this function:

◆ thread__resolve_callchain_unwind()

static int thread__resolve_callchain_unwind ( struct thread thread,
struct callchain_cursor cursor,
struct perf_evsel evsel,
struct perf_sample sample,
int  max_stack 
)
static

Definition at line 2288 of file machine.c.

Here is the call graph for this function:

◆ unwind_entry()

static int unwind_entry ( struct unwind_entry entry,
void *  arg 
)
static

Definition at line 2271 of file machine.c.

Here is the call graph for this function:

Variable Documentation

◆ ref_reloc_sym_names

const char* ref_reloc_sym_names[] = {"_text", "_stext", NULL}

Definition at line 819 of file machine.c.