Linux Perf
|
#include "builtin.h"
#include "perf.h"
#include "util/build-id.h"
#include "util/util.h"
#include <subcmd/parse-options.h>
#include "util/parse-events.h"
#include "util/config.h"
#include "util/callchain.h"
#include "util/cgroup.h"
#include "util/header.h"
#include "util/event.h"
#include "util/evlist.h"
#include "util/evsel.h"
#include "util/debug.h"
#include "util/drv_configs.h"
#include "util/session.h"
#include "util/tool.h"
#include "util/symbol.h"
#include "util/cpumap.h"
#include "util/thread_map.h"
#include "util/data.h"
#include "util/perf_regs.h"
#include "util/auxtrace.h"
#include "util/tsc.h"
#include "util/parse-branch-options.h"
#include "util/parse-regs-options.h"
#include "util/llvm-utils.h"
#include "util/bpf-loader.h"
#include "util/trigger.h"
#include "util/perf-hooks.h"
#include "util/time-utils.h"
#include "util/units.h"
#include "asm/bug.h"
#include <errno.h>
#include <inttypes.h>
#include <locale.h>
#include <poll.h>
#include <unistd.h>
#include <sched.h>
#include <signal.h>
#include <sys/mman.h>
#include <sys/wait.h>
#include <linux/time64.h>
Go to the source code of this file.
Classes | |
struct | switch_output |
struct | record |
struct | clockid_map |
Macros | |
#define | CLOCKID_MAP(n, c) { .name = n, .clockid = (c), } |
#define | CLOCKID_END { .name = NULL, } |
#define | CLOCK_MONOTONIC_RAW 4 |
#define | CLOCK_BOOTTIME 7 |
#define | CLOCK_TAI 11 |
#define | set_nobuild(s, l, c) set_option_nobuild(record_options, s, l, "NO_LIBBPF=1", c) |
#define | REASON "NO_DWARF=1" |
#define | set_nobuild(s, l, c) set_option_nobuild(record_options, s, l, REASON, c) |
Functions | |
static | DEFINE_TRIGGER (auxtrace_snapshot_trigger) |
static | DEFINE_TRIGGER (switch_output_trigger) |
static bool | switch_output_signal (struct record *rec) |
static bool | switch_output_size (struct record *rec) |
static bool | switch_output_time (struct record *rec) |
static int | record__write (struct record *rec, void *bf, size_t size) |
static int | process_synthesized_event (struct perf_tool *tool, union perf_event *event, struct perf_sample *sample __maybe_unused, struct machine *machine __maybe_unused) |
static int | record__pushfn (void *to, void *bf, size_t size) |
static void | sig_handler (int sig) |
static void | sigsegv_handler (int sig) |
static void | record__sig_exit (void) |
static int | record__auxtrace_mmap_read (struct record *rec __maybe_unused, struct auxtrace_mmap *mm __maybe_unused) |
static void | record__read_auxtrace_snapshot (struct record *rec __maybe_unused) |
static int | auxtrace_record__snapshot_start (struct auxtrace_record *itr __maybe_unused) |
static int | record__auxtrace_init (struct record *rec __maybe_unused) |
static int | record__mmap_evlist (struct record *rec, struct perf_evlist *evlist) |
static int | record__mmap (struct record *rec) |
static int | record__open (struct record *rec) |
static int | process_sample_event (struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct perf_evsel *evsel, struct machine *machine) |
static int | process_buildids (struct record *rec) |
static void | perf_event__synthesize_guest_os (struct machine *machine, void *data) |
static int | record__mmap_read_evlist (struct record *rec, struct perf_evlist *evlist, bool overwrite) |
static int | record__mmap_read_all (struct record *rec) |
static void | record__init_features (struct record *rec) |
static void | record__finish_output (struct record *rec) |
static int | record__synthesize_workload (struct record *rec, bool tail) |
static int | record__synthesize (struct record *rec, bool tail) |
static int | record__switch_output (struct record *rec, bool at_exit) |
static void | workload_exec_failed_signal (int signo __maybe_unused, siginfo_t *info, void *ucontext __maybe_unused) |
static void | snapshot_sig_handler (int sig) |
static void | alarm_sig_handler (int sig) |
int __weak | perf_event__synth_time_conv (const struct perf_event_mmap_page *pc __maybe_unused, struct perf_tool *tool __maybe_unused, perf_event__handler_t process __maybe_unused, struct machine *machine __maybe_unused) |
static const struct perf_event_mmap_page * | perf_evlist__pick_pc (struct perf_evlist *evlist) |
static const struct perf_event_mmap_page * | record__pick_pc (struct record *rec) |
static int | __cmd_record (struct record *rec, int argc, const char **argv) |
static void | callchain_debug (struct callchain_param *callchain) |
int | record_opts__parse_callchain (struct record_opts *record, struct callchain_param *callchain, const char *arg, bool unset) |
int | record_parse_callchain_opt (const struct option *opt, const char *arg, int unset) |
int | record_callchain_opt (const struct option *opt, const char *arg __maybe_unused, int unset __maybe_unused) |
static int | perf_record_config (const char *var, const char *value, void *cb) |
static int | parse_clockid (const struct option *opt, const char *str, int unset) |
static int | record__parse_mmap_pages (const struct option *opt, const char *str, int unset __maybe_unused) |
static void | switch_output_size_warn (struct record *rec) |
static int | switch_output_setup (struct record *rec) |
int | cmd_record (int argc, const char **argv) |
Variables | |
static volatile int | auxtrace_record__snapshot_started |
static volatile int | done |
static volatile int | signr = -1 |
static volatile int | child_finished |
static struct perf_event_header | finished_round_event |
static volatile int | workload_exec_errno |
static const struct clockid_map | clockids [] |
static const char *const | __record_usage [] |
const char *const * | record_usage = __record_usage |
static struct record | record |
const char | record_callchain_help [] |
static bool | dry_run |
static struct option | __record_options [] |
struct option * | record_options = __record_options |
#define CLOCK_BOOTTIME 7 |
Definition at line 1312 of file builtin-record.c.
#define CLOCK_MONOTONIC_RAW 4 |
Definition at line 1309 of file builtin-record.c.
#define CLOCK_TAI 11 |
Definition at line 1315 of file builtin-record.c.
#define CLOCKID_END { .name = NULL, } |
Definition at line 1302 of file builtin-record.c.
Definition at line 1299 of file builtin-record.c.
#define REASON "NO_DWARF=1" |
#define set_nobuild | ( | s, | |
l, | |||
c | |||
) | set_option_nobuild(record_options, s, l, "NO_LIBBPF=1", c) |
#define set_nobuild | ( | s, | |
l, | |||
c | |||
) | set_option_nobuild(record_options, s, l, REASON, c) |
|
static |
|
static |
|
inlinestatic |
Definition at line 309 of file builtin-record.c.
|
static |
Definition at line 1213 of file builtin-record.c.
int cmd_record | ( | int | argc, |
const char ** | argv | ||
) |
|
static |
|
static |
|
static |
int __weak perf_event__synth_time_conv | ( | const struct perf_event_mmap_page *pc | __maybe_unused, |
struct perf_tool *tool | __maybe_unused, | ||
perf_event__handler_t process | __maybe_unused, | ||
struct machine *machine | __maybe_unused | ||
) |
Definition at line 713 of file builtin-record.c.
|
static |
|
static |
Definition at line 722 of file builtin-record.c.
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 314 of file builtin-record.c.
|
inlinestatic |
Definition at line 297 of file builtin-record.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
Definition at line 304 of file builtin-record.c.
|
static |
|
static |
|
static |
|
static |
|
static |
int record_callchain_opt | ( | const struct option * | opt, |
const char *arg | __maybe_unused, | ||
int unset | __maybe_unused | ||
) |
int record_opts__parse_callchain | ( | struct record_opts * | record, |
struct callchain_param * | callchain, | ||
const char * | arg, | ||
bool | unset | ||
) |
int record_parse_callchain_opt | ( | const struct option * | opt, |
const char * | arg, | ||
int | unset | ||
) |
|
static |
Definition at line 145 of file builtin-record.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1547 of file builtin-record.c.
|
static |
Definition at line 1493 of file builtin-record.c.
|
static |
Definition at line 86 of file builtin-record.c.
|
static |
Definition at line 143 of file builtin-record.c.
|
static |
Definition at line 1318 of file builtin-record.c.
|
static |
Definition at line 141 of file builtin-record.c.
|
static |
Definition at line 1538 of file builtin-record.c.
|
static |
Definition at line 508 of file builtin-record.c.
Definition at line 1510 of file builtin-record.c.
const char record_callchain_help[] |
Definition at line 1535 of file builtin-record.c.
struct option* record_options = __record_options |
Definition at line 1684 of file builtin-record.c.
const char* const* record_usage = __record_usage |
Definition at line 1498 of file builtin-record.c.
|
static |
Definition at line 142 of file builtin-record.c.
|
static |
Definition at line 693 of file builtin-record.c.