blob: dab14d0ad3d0093d4682bab9a0c4769e3949ca55 [file] [log] [blame]
Arnaldo Carvalho de Melo8c3e10e2011-01-31 14:50:39 -02001#ifndef __PERF_TOP_H
2#define __PERF_TOP_H 1
3
Arnaldo Carvalho de Melo45694aa2011-11-28 08:30:20 -02004#include "tool.h"
Arnaldo Carvalho de Melo8c3e10e2011-01-31 14:50:39 -02005#include "types.h"
Arnaldo Carvalho de Melo8c3e10e2011-01-31 14:50:39 -02006#include <stddef.h>
Arnaldo Carvalho de Melo45694aa2011-11-28 08:30:20 -02007#include <stdbool.h>
Irina Tirdea57ec0a92012-09-08 03:43:18 +03008#include <termios.h>
Arnaldo Carvalho de Melo8c3e10e2011-01-31 14:50:39 -02009
10struct perf_evlist;
11struct perf_evsel;
Arnaldo Carvalho de Melo45694aa2011-11-28 08:30:20 -020012struct perf_session;
Arnaldo Carvalho de Melo8c3e10e2011-01-31 14:50:39 -020013
Arnaldo Carvalho de Melo8c3e10e2011-01-31 14:50:39 -020014struct perf_top {
Arnaldo Carvalho de Melo45694aa2011-11-28 08:30:20 -020015 struct perf_tool tool;
Arnaldo Carvalho de Melo8c3e10e2011-01-31 14:50:39 -020016 struct perf_evlist *evlist;
Arnaldo Carvalho de Melob4006792013-12-19 14:43:45 -030017 struct record_opts record_opts;
Arnaldo Carvalho de Melo8c3e10e2011-01-31 14:50:39 -020018 /*
19 * Symbols will be added here in perf_event__process_sample and will
20 * get out after decayed.
21 */
Arnaldo Carvalho de Melo8c3e10e2011-01-31 14:50:39 -020022 u64 samples;
23 u64 kernel_samples, us_samples;
24 u64 exact_samples;
25 u64 guest_us_samples, guest_kernel_samples;
26 int print_entries, count_filter, delay_secs;
Waiman Long5dbb6e82013-10-18 10:38:49 -040027 int max_stack;
Arnaldo Carvalho de Melo8c3e10e2011-01-31 14:50:39 -020028 bool hide_kernel_symbols, hide_user_symbols, zero;
Arnaldo Carvalho de Melo1758af12011-11-28 09:37:05 -020029 bool use_tui, use_stdio;
Arnaldo Carvalho de Melo1758af12011-11-28 09:37:05 -020030 bool kptr_restrict_warned;
31 bool vmlinux_warned;
Arnaldo Carvalho de Melo1758af12011-11-28 09:37:05 -020032 bool dump_symtab;
Arnaldo Carvalho de Meloab81f3f2011-10-05 19:16:15 -030033 struct hist_entry *sym_filter_entry;
Arnaldo Carvalho de Melo8c3e10e2011-01-31 14:50:39 -020034 struct perf_evsel *sym_evsel;
Arnaldo Carvalho de Melodcc101d2011-09-01 14:27:58 -030035 struct perf_session *session;
Arnaldo Carvalho de Melo1758af12011-11-28 09:37:05 -020036 struct winsize winsize;
Arnaldo Carvalho de Melo1758af12011-11-28 09:37:05 -020037 int realtime_prio;
38 int sym_pcnt_filter;
39 const char *sym_filter;
Namhyung Kimfa5df942013-05-14 11:09:05 +090040 float min_percent;
Arnaldo Carvalho de Melo8c3e10e2011-01-31 14:50:39 -020041};
42
David Ahern42ee8c62013-08-02 14:05:39 -060043#define CONSOLE_CLEAR ""
44
Arnaldo Carvalho de Melo8c3e10e2011-01-31 14:50:39 -020045size_t perf_top__header_snprintf(struct perf_top *top, char *bf, size_t size);
46void perf_top__reset_sample_counters(struct perf_top *top);
Arnaldo Carvalho de Melo8c3e10e2011-01-31 14:50:39 -020047#endif /* __PERF_TOP_H */