37 #include <linux/rbtree.h> 38 #include <subcmd/parse-options.h> 64 #include <sys/syscall.h> 65 #include <sys/ioctl.h> 67 #include <sys/prctl.h> 70 #include <sys/utsname.h> 73 #include <linux/stringify.h> 74 #include <linux/time64.h> 75 #include <linux/types.h> 82 #define HEADER_LINE_NR 5 108 if (!he || !he->
ms.
sym)
119 pr_err(
"Can't annotate %s: No vmlinux file was found in the " 120 "path\n", sym->
name);
126 pthread_mutex_lock(¬es->
lock);
129 pthread_mutex_unlock(¬es->
lock);
130 pr_err(
"Not enough memory for annotating '%s' symbol!\n",
142 pr_err(
"Couldn't annotate %s: %s\n", sym->
name, msg);
145 pthread_mutex_unlock(¬es->
lock);
158 int err = uname(&uts);
161 "Addr: %" PRIx64
"\n" 163 "Map: %" PRIx64
"-%" PRIx64
"\n" 164 "Symbol: %" PRIx64
"-%" PRIx64
" %c %s\n" 168 "Not all samples will be on the annotation output.\n\n" 169 "Please report to linux-kernel@vger.kernel.org\n",
172 sym->
binding == STB_GLOBAL ?
'g' :
174 err ?
"[unknown]" : uts.machine,
198 if (pthread_mutex_trylock(¬es->
lock))
203 pthread_mutex_unlock(¬es->
lock);
214 else if (err == -ENOMEM) {
215 pr_err(
"Not enough memory for annotating '%s' symbol!\n",
238 pthread_mutex_lock(¬es->
lock);
242 if (notes->
src == NULL)
257 printf(
"%d lines not displayed, maybe increase display entries [e]\n", more);
259 pthread_mutex_unlock(¬es->
lock);
266 const int win_width = top->
winsize.ws_col - 1;
285 "WARNING: LOST %d chunks, Check IO/CPU overload",
315 char *buf =
malloc(0), *p;
319 fprintf(stdout,
"\n%s: ", msg);
320 if (getline(&buf, &dummy, stdin) < 0)
323 p = strchr(buf,
'\n');
333 tmp = strtoul(buf, NULL, 10);
344 if (tmp >= 0 && tmp <= 100)
350 char *buf =
malloc(0), *p;
353 struct rb_node *next;
362 fprintf(stdout,
"\n%s: ", msg);
363 if (getline(&buf, &dummy, stdin) < 0)
366 p = strchr(buf,
'\n');
370 next = rb_first(&hists->
entries);
372 n = rb_entry(next,
struct hist_entry, rb_node);
373 if (n->ms.sym && !strcmp(buf, n->ms.sym->name)) {
377 next = rb_next(&n->rb_node);
381 fprintf(stderr,
"Sorry, %s is not active.\n", buf);
399 fprintf(stdout,
"\nMapped keys:\n");
400 fprintf(stdout,
"\t[d] display refresh delay. \t(%d)\n", top->
delay_secs);
401 fprintf(stdout,
"\t[e] display entries (lines). \t(%d)\n", top->
print_entries);
406 fprintf(stdout,
"\t[f] profile display filter (count). \t(%d)\n", top->
count_filter);
409 fprintf(stdout,
"\t[s] annotate symbol. \t(%s)\n", name?:
"NULL");
410 fprintf(stdout,
"\t[S] stop annotation.\n");
413 "\t[K] hide kernel symbols. \t(%s)\n",
416 "\t[U] hide user symbols. \t(%s)\n",
418 fprintf(stdout,
"\t[z] toggle sample zeroing. \t(%d)\n", top->
zero ? 1 : 0);
419 fprintf(stdout,
"\t[qQ] quit.\n");
451 struct pollfd stdin_poll = { .fd = 0, .events = POLLIN };
455 fprintf(stdout,
"\nEnter selection, or unmapped key to continue: ");
460 poll(&stdin_poll, 1, -1);
463 tcsetattr(0, TCSAFLUSH, &save);
480 signal(SIGWINCH, SIG_DFL);
488 fprintf(stderr,
"\nAvailable events:");
512 "Enter details display event filter (percent)");
519 printf(
"exiting.\n");
580 const char *help =
"For a higher level overview, try: perf top --sort comm,dso";
632 struct pollfd stdin_poll = { .fd = 0, .events = POLLIN };
658 switch (poll(&stdin_poll, 1, delay_msecs)) {
667 tcsetattr(0, TCSAFLUSH, &save);
675 tcsetattr(0, TCSAFLUSH, &save);
712 pr_err(
"Can't find guest [%d]'s kernel information\n",
720 pr_err(
"%u unprocessable samples recorded.\r",
725 if (event->
header.misc & PERF_RECORD_MISC_EXACT_IP)
733 al.
cpumode == PERF_RECORD_MISC_KERNEL) {
736 "Kernel address maps (/proc/{kallsyms,modules}) are restricted.\n\n" 737 "Check /proc/sys/kernel/kptr_restrict.\n\n" 738 "Kernel%s samples will not be resolved.\n",
747 if (al.
sym == NULL && al.
map != NULL) {
748 const char *msg =
"Kernel samples will not be resolved.\n";
791 pthread_mutex_lock(&hists->
lock);
795 pr_err(
"Problem incrementing symbol period, skipping event\n");
797 pthread_mutex_unlock(&hists->
lock);
822 pr_err(
"Can't parse sample, err = %d\n", ret);
827 assert(evsel != NULL);
829 if (event->
header.type == PERF_RECORD_SAMPLE)
833 case PERF_RECORD_MISC_USER:
839 case PERF_RECORD_MISC_KERNEL:
845 case PERF_RECORD_MISC_GUEST_KERNEL:
850 case PERF_RECORD_MISC_GUEST_USER:
858 if (event->
header.type == PERF_RECORD_SAMPLE)
865 if (event->
header.type == PERF_RECORD_SAMPLE) {
868 }
else if (event->
header.type < PERF_RECORD_MAX) {
884 unsigned long long start, end;
902 "Please try increasing the period (-c) or\n" 903 "decreasing the freq (-F) or\n" 904 "limiting the number of CPUs (-C)\n");
929 struct list_head *config_terms;
931 int set, overwrite = -1;
936 list_for_each_entry(term, config_terms, list) {
942 if ((overwrite < 0) && (
set < 0))
946 if ((overwrite >= 0) && (
set >= 0) && (overwrite !=
set))
950 if ((overwrite >= 0) && (
set < 0))
954 if ((overwrite < 0) && (
set >= 0)) {
963 if ((overwrite >= 0) && (opts->
overwrite != overwrite))
984 counter->
attr.write_backward =
false;
986 pr_debug2(
"fall back to non-overwrite mode\n");
998 ui__error(
"perf top only support consistent per-event " 999 "overwrite setting for all events\n");
1031 errno, msg,
sizeof(msg));
1038 ui__error(
"Failed to mmap with %d (%s)\n",
1039 errno, str_error_r(errno, msg,
sizeof(msg)));
1053 ui__error(
"Selected -g but \"sym\" not present in --sort/-s.");
1058 ui__error(
"Can't register callchain params.\n");
1108 goto out_err_cpu_topo;
1117 pr_err(
"failed to set config \"%s\" on event %s with %d (%s)\n",
1119 str_error_r(errno, msg,
sizeof(msg)));
1145 ui__error(
"Could not create display thread.\n");
1150 struct sched_param param;
1153 if (sched_setscheduler(0, SCHED_FIFO, ¶m)) {
1154 ui__error(
"Could not set realtime priority.\n");
1175 pthread_join(thread, NULL);
1183 char errbuf[BUFSIZ];
1184 const char *
err = str_error_r(-ret, errbuf,
sizeof(errbuf));
1186 ui__error(
"Could not read the CPU topology map: %s\n", err);
1220 if (!strcmp(var,
"top.call-graph")) {
1221 var =
"call-graph.record-mode";
1224 if (!strcmp(var,
"top.children")) {
1234 int unset __maybe_unused)
1243 "\n\t\t\t\tDefault: fp,graph,0.5,caller,function";
1247 char errbuf[BUFSIZ];
1252 .mmap_pages = UINT_MAX,
1253 .user_freq = UINT_MAX,
1254 .user_interval = ULLONG_MAX,
1259 .proc_map_timeout = 500,
1264 .nr_threads_synthesize = UINT_MAX,
1268 const struct option options[] = {
1269 OPT_CALLBACK(
'e',
"event", &top.
evlist,
"event",
1270 "event selector. use 'perf list' to list available events",
1272 OPT_U64(
'c',
"count", &opts->
user_interval,
"event period to sample"),
1273 OPT_STRING(
'p',
"pid", &target->
pid,
"pid",
1274 "profile events on existing process id"),
1275 OPT_STRING(
't',
"tid", &target->
tid,
"tid",
1276 "profile events on existing thread id"),
1277 OPT_BOOLEAN(
'a',
"all-cpus", &target->
system_wide,
1278 "system-wide collection from all CPUs"),
1279 OPT_STRING(
'C',
"cpu", &target->
cpu_list,
"cpu",
1280 "list of cpus to monitor"),
1282 "file",
"vmlinux pathname"),
1284 "don't load vmlinux even if found"),
1286 "hide kernel symbols"),
1287 OPT_CALLBACK(
'm',
"mmap-pages", &opts->
mmap_pages,
"pages",
1288 "number of mmap data pages",
1291 "collect data with this RT SCHED_FIFO priority"),
1293 "number of seconds to delay between refreshes"),
1295 "dump the symbol table used for profiling"),
1297 "only display functions with more events than this"),
1298 OPT_BOOLEAN(0,
"group", &opts->
group,
1299 "put the counters into a counter group"),
1300 OPT_BOOLEAN(
'i',
"no-inherit", &opts->
no_inherit,
1301 "child tasks do not inherit counters"),
1302 OPT_STRING(0,
"sym-annotate", &top.
sym_filter,
"symbol name",
1303 "symbol to annotate"),
1304 OPT_BOOLEAN(
'z',
"zero", &top.
zero,
"zero history across updates"),
1305 OPT_CALLBACK(
'F',
"freq", &top.
record_opts,
"freq or 'max'",
1306 "profile at this frequency",
1309 "display this many functions"),
1311 "hide user symbols"),
1312 OPT_BOOLEAN(0,
"tui", &top.
use_tui,
"Use the TUI interface"),
1313 OPT_BOOLEAN(0,
"stdio", &top.
use_stdio,
"Use the stdio interface"),
1314 OPT_INCR(
'v',
"verbose", &
verbose,
1315 "be more verbose (show counter open errors, etc)"),
1316 OPT_STRING(
's',
"sort", &
sort_order,
"key[,key2...]",
1317 "sort by key(s): pid, comm, dso, symbol, parent, cpu, srcline, ..." 1318 " Please refer the man page for the complete list."),
1319 OPT_STRING(0,
"fields", &
field_order,
"key[,keys...]",
1320 "output field(s): overhead, period, sample plus all of sort keys"),
1322 "Show a column with the number of samples"),
1324 NULL,
"enables call-graph recording and display",
1327 "record_mode[,record_size],print_type,threshold[,print_limit],order,sort_key[,branch]",
1330 "Accumulate callchains of children and show total overhead as well"),
1331 OPT_INTEGER(0,
"max-stack", &top.
max_stack,
1332 "Set the maximum stack depth when parsing the callchain. " 1333 "Default: kernel.perf_event_max_stack or " __stringify(PERF_MAX_STACK_DEPTH)),
1334 OPT_CALLBACK(0,
"ignore-callees", NULL,
"regex",
1335 "ignore callees of these functions in call graphs",
1338 "Show a column with the sum of periods"),
1340 "only consider symbols in these dsos"),
1342 "only consider symbols in these comms"),
1344 "only consider these symbols"),
1346 "Interleave source code with assembly code (default)"),
1348 "Display raw encoding of assembly instructions (default)"),
1350 "Enable kernel symbol demangling"),
1352 "objdump binary to use for disassembly and annotations"),
1354 "Specify disassembler style (e.g. -M intel for intel syntax)"),
1355 OPT_STRING(
'u',
"uid", &target->
uid_str,
"user",
"user to profile"),
1356 OPT_CALLBACK(0,
"percent-limit", &top,
"percent",
1358 OPT_CALLBACK(0,
"percentage", NULL,
"relative|absolute",
1362 "don't try to adjust column width, use these fixed values"),
1364 "per thread proc mmap processing timeout in ms"),
1365 OPT_CALLBACK_NOOPT(
'b',
"branch-any", &opts->
branch_stack,
1366 "branch any",
"sample any taken branches",
1368 OPT_CALLBACK(
'j',
"branch-filter", &opts->
branch_stack,
1369 "branch filter mask",
"branch stack filter modes",
1372 "Show raw trace event output (do not use print fmt or plugins)"),
1374 "Show entries in a hierarchy"),
1377 "number of thread to run event synthesize"),
1380 const char *
const top_usage[] = {
1381 "perf top [<options>]",
1400 argc = parse_options(argc, argv, options, top_usage, 0);
1402 usage_with_options(top_usage, options);
1406 pr_err(
"Not enough memory for event selector list\n");
1407 goto out_delete_evlist;
1416 pr_err(
"Error: --hierarchy and --fields options cannot be used together\n");
1417 parse_options_usage(top_usage, options,
"fields", 0);
1418 parse_options_usage(NULL, options,
"hierarchy", 0);
1419 goto out_delete_evlist;
1436 parse_options_usage(top_usage, options,
"s", 1);
1438 parse_options_usage(
sort_order ? NULL : top_usage,
1439 options,
"fields", 0);
1440 goto out_delete_evlist;
1451 int saved_errno = errno;
1456 status = -saved_errno;
1457 goto out_delete_evlist;
1464 ui__error(
"Couldn't create thread/CPU maps: %s\n",
1465 errno == ENOENT ?
"No such process" : str_error_r(errno, errbuf,
sizeof(errbuf)));
1466 goto out_delete_evlist;
1474 goto out_delete_evlist;
1489 goto out_delete_evlist;
static void setup_sorting(struct perf_sched *sched, const struct option *options, const char *const usage_msg[])
enum target_errno target__parse_uid(struct target *target)
char dso__symtab_origin(const struct dso *dso)
void perf_session__set_id_hdr_size(struct perf_session *session)
void hists__inc_nr_events(struct hists *hists, u32 type)
const char * comm_list_str
const char * col_width_list_str
int color_fprintf(FILE *fp, const char *color, const char *fmt,...)
struct perf_sample * sample
void perf_mmap__consume(struct perf_mmap *map)
void perf_hpp__cancel_cumulate(void)
void symbol__calc_percent(struct symbol *sym, struct perf_evsel *evsel)
struct perf_evlist * evlist
static void perf_top__update_print_entries(struct perf_top *top)
union perf_evsel_config_term::@112 val
int machine__resolve(struct machine *machine, struct addr_location *al, struct perf_sample *sample)
const char * vmlinux_name
int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target)
void symbol__annotate_zero_histograms(struct symbol *sym)
void symbol__annotate_zero_histogram(struct symbol *sym, int evidx)
static struct machine * perf_session__find_machine(struct perf_session *session, pid_t pid)
enum sort_mode sort__mode
int ui__error(const char *format,...)
#define CALLCHAIN_REPORT_HELP
int hist_entry__inc_addr_samples(struct hist_entry *he, struct perf_sample *sample, struct perf_evsel *evsel, u64 ip)
int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help, struct hist_browser_timer *hbt, float min_pcnt, struct perf_env *env, bool warn_lost_event, struct annotation_options *annotation_opts)
int perf_default_config(const char *var, const char *value, void *dummy __maybe_unused)
enum target_errno target__validate(struct target *target)
static void ui__warn_map_erange(struct map *map, struct symbol *sym, u64 ip)
const char perf_version_string[]
const char * graph_dotted_line
#define CALLCHAIN_RECORD_HELP
void perf_evlist__enable(struct perf_evlist *evlist)
int intlist__add(struct intlist *ilist, int i)
static int machine__synthesize_threads(struct machine *machine, struct target *target, struct thread_map *threads, bool data_mmap, unsigned int proc_map_timeout, unsigned int nr_threads_synthesize)
void perf_set_singlethreaded(void)
int ui__warning(const char *format,...)
void hists__output_recalc_col_len(struct hists *hists, int max_rows)
int hists__collapse_resort(struct hists *hists, struct ui_progress *prog)
int perf_config_bool(const char *name, const char *value)
struct perf_evsel * sym_evsel
bool perf_evlist__exclude_kernel(struct perf_evlist *evlist)
unsigned int proc_map_timeout
int dso__strerror_load(struct dso *dso, char *buf, size_t buflen)
static void perf_top__print_mapped_keys(struct perf_top *top)
#define pr_debug2(fmt,...)
enum perf_call_graph_mode record_mode
size_t perf_session__fprintf_dsos(struct perf_session *session, FILE *fp)
static void perf_top__mmap_read_idx(struct perf_top *top, int idx)
void perf_evlist__delete(struct perf_evlist *evlist)
struct annotation_options annotation_opts
void set_term_quiet_input(struct termios *old)
struct hist_entry * sym_filter_entry
static int term(yyscan_t scanner, int type)
const char * uid_filter_str
static void perf_event__process_sample(struct perf_tool *tool, const union perf_event *event, struct perf_evsel *evsel, struct perf_sample *sample, struct machine *machine)
static struct hists * evsel__hists(struct perf_evsel *evsel)
struct thread_map * threads
static bool target__none(struct target *target)
int machine__process_event(struct machine *machine, union perf_event *event, struct perf_sample *sample)
static unsigned long long rdclock(void)
unsigned int nr_threads_synthesize
int symbol__strerror_disassemble(struct symbol *sym __maybe_unused, struct map *map, int errnum, char *buf, size_t buflen)
void perf_session__delete(struct perf_session *session)
int record_opts__config(struct record_opts *opts)
static int callchain_param__setup_sample_type(struct callchain_param *callchain)
int perf_evlist__parse_mmap_pages(const struct option *opt, const char *str, int unset __maybe_unused)
static void prompt_percent(int *target, const char *msg)
struct perf_mmap * overwrite_mmap
bool perf_evsel__fallback(struct perf_evsel *evsel, int err, char *msg, size_t msgsize)
int target__strerror(struct target *target, int errnum, char *buf, size_t buflen)
const char top_callchain_help[]
int record__parse_freq(const struct option *opt, const char *str, int unset)
static bool intlist__has_entry(struct intlist *ilist, int i)
void addr_location__put(struct addr_location *al)
int perf_mmap__read_init(struct perf_mmap *map)
void setup_browser(bool fallback_to_pager)
const char * objdump_path
static struct perf_evsel * hists_to_evsel(struct hists *hists)
int perf_evlist__poll(struct perf_evlist *evlist, int timeout)
static void perf_top__mmap_read(struct perf_top *top)
static struct perf_session * session
static void * display_thread_tui(void *arg)
static void winch_sig(int sig __maybe_unused)
static void perf_top__prompt_symbol(struct perf_top *top, const char *msg)
int perf_env__lookup_objdump(struct perf_env *env, const char **path)
#define evlist__for_each_entry(evlist, evsel)
static void display_setup_sig(void)
void perf_top__reset_sample_counters(struct perf_top *top)
int perf_evlist__parse_sample(struct perf_evlist *evlist, union perf_event *event, struct perf_sample *sample)
void sort__setup_elide(FILE *output)
static void prompt_integer(int *target, const char *msg)
struct record_opts record_opts
void perf_evlist__toggle_bkw_mmap(struct perf_evlist *evlist, enum bkw_mmap_state state)
void perf_set_multithreaded(void)
int perf_session__register_idle_thread(struct perf_session *session)
struct annotated_source * symbol__hists(struct symbol *sym, int nr_hists)
static struct perf_tool tool
static void * display_thread(void *arg)
static void perf_top__print_sym_table(struct perf_top *top)
void pthread__unblock_sigwinch(void)
bool kptr_restrict_warned
struct perf_session * session
void symbol__annotate_decay_histogram(struct symbol *sym, int evidx)
int symbol__annotation_init(void)
int symbol__annotate_printf(struct symbol *sym, struct map *map, struct perf_evsel *evsel, struct annotation_options *opts)
struct perf_evsel * perf_evlist__id2evsel(struct perf_evlist *evlist, u64 id)
static struct annotation * symbol__annotation(struct symbol *sym)
static bool dso__is_kcore(struct dso *dso)
static int perf_top_config(const char *var, const char *value, void *cb __maybe_unused)
static int parse_percent_limit(const struct option *opt, const char *arg, int unset __maybe_unused)
struct branch_stack * branch_stack
void perf_evlist__config(struct perf_evlist *evlist, struct record_opts *opts, struct callchain_param *callchain)
struct list_head config_terms
int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target, int err, char *msg, size_t size)
int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages)
const char * disassembler_style
static int perf_top_overwrite_fallback(struct perf_top *top, struct perf_evsel *evsel)
bool map__has_symbols(const struct map *map)
u32 nr_unprocessable_samples
const char * dso_list_str
void get_term_dimensions(struct winsize *ws)
int report_parse_ignore_callees_opt(const struct option *opt __maybe_unused, const char *arg, int unset __maybe_unused)
static void perf_top__show_details(struct perf_top *top)
const char * perf_evsel__name(struct perf_evsel *evsel)
int perf_evlist__apply_drv_configs(struct perf_evlist *evlist, struct perf_evsel **err_evsel, struct perf_evsel_config_term **err_term)
static int __cmd_top(struct perf_top *top)
size_t perf_top__header_snprintf(struct perf_top *top, char *bf, size_t size)
void perf_mmap__read_done(struct perf_mmap *map)
struct perf_event_header header
static void perf_top__resize(struct perf_top *top)
int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus, struct thread_map *threads)
struct intlist * intlist__new(const char *slist)
const struct hist_iter_ops hist_iter_normal
static void perf_top__record_precise_ip(struct perf_top *top, struct hist_entry *he, struct perf_sample *sample, struct perf_evsel *evsel, u64 ip)
struct perf_evsel * selected
void hist__account_cycles(struct branch_stack *bs, struct addr_location *al, struct perf_sample *sample, bool nonany_branch_mode)
struct perf_session * perf_session__new(struct perf_data *data, bool repipe, struct perf_tool *tool)
static struct perf_evsel * perf_evlist__first(struct perf_evlist *evlist)
int parse_events_option(const struct option *opt, const char *str, int unset __maybe_unused)
union perf_event * perf_mmap__read_event(struct perf_mmap *map)
struct annotation_options annotation__default_options
static int perf_top__parse_source(struct perf_top *top, struct hist_entry *he)
int perf_config(config_fn_t fn, void *data)
static int perf_top__overwrite_check(struct perf_top *top)
struct annotated_source * src
static int callchain_opt(const struct option *opt, const char *arg, int unset)
static int sym(yyscan_t scanner, int type, int config)
bool __map__is_kernel(const struct map *map)
struct events_stats stats
static int parse_callchain_opt(const struct option *opt, const char *arg, int unset)
static int perf_top__start_counters(struct perf_top *top)
struct perf_evsel * evsel
struct perf_header header
enum dso_binary_type symtab_type
int symbol__init(struct perf_env *env)
const struct hist_iter_ops hist_iter_cumulative
void hists__decay_entries(struct hists *hists, bool zap_user, bool zap_kernel)
static bool perf_top__handle_keypress(struct perf_top *top, int c)
static int hist_iter__top_callback(struct hist_entry_iter *iter, struct addr_location *al, bool single, void *arg)
const char * sym_list_str
int perf_env__read_cpu_topology_map(struct perf_env *env)
struct events_stats stats
u32 nr_events[PERF_RECORD_HEADER_MAX]
void hists__delete_entries(struct hists *hists)
int cmd_top(int argc, const char **argv)
void perf_evsel__output_resort(struct perf_evsel *evsel, struct ui_progress *prog)
void annotation_config__init(void)
const struct hist_iter_ops * ops
static int perf_top__key_mapped(struct perf_top *top, int c)
int parse_filter_percentage(const struct option *opt __maybe_unused, const char *arg, int unset __maybe_unused)
static void __zero_source_counters(struct hist_entry *he)
size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows, int max_cols, float min_pcnt, FILE *fp, bool use_callchain)
static int perf_evlist__add_default(struct perf_evlist *evlist)
struct perf_evlist * evlist
void sighandler_dump_stack(int sig)
int callchain_register_param(struct callchain_param *param)
int sysctl__max_stack(void)
int symbol__annotate(struct symbol *sym, struct map *map, struct perf_evsel *evsel, size_t privsize, struct annotation_options *options, struct arch **parch)
struct perf_evlist * perf_evlist__new(void)
struct perf_event_attr attr
int parse_callchain_top_opt(const char *arg)
int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al, int max_stack_depth, void *arg)
static volatile int resize
int record_callchain_opt(const struct option *opt, const char *arg __maybe_unused, int unset __maybe_unused)
static void perf_top__sort_new_samples(void *arg)
int parse_branch_stack(const struct option *opt, const char *str, int unset)
static void display_sig(int sig __maybe_unused)