blob: 9add1f72ce95c6c50dd4a59878eaad1c5738d51d [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __PERF_TOP_H
3#define __PERF_TOP_H 1
4
5#include "tool.h"
6#include "annotate.h"
7#include <linux/types.h>
8#include <stddef.h>
9#include <stdbool.h>
10#include <sys/ioctl.h>
11
12struct perf_evlist;
13struct perf_evsel;
14struct perf_session;
15
16struct perf_top {
17 struct perf_tool tool;
18 struct perf_evlist *evlist;
19 struct record_opts record_opts;
20 struct annotation_options annotation_opts;
21 /*
22 * Symbols will be added here in perf_event__process_sample and will
23 * get out after decayed.
24 */
25 u64 samples;
26 u64 kernel_samples, us_samples;
27 u64 exact_samples;
28 u64 guest_us_samples, guest_kernel_samples;
29 int print_entries, count_filter, delay_secs;
30 int max_stack;
31 bool hide_kernel_symbols, hide_user_symbols, zero;
32 bool use_tui, use_stdio;
33 bool vmlinux_warned;
34 bool dump_symtab;
35 struct hist_entry *sym_filter_entry;
36 struct perf_evsel *sym_evsel;
37 struct perf_session *session;
38 struct winsize winsize;
39 int realtime_prio;
40 const char *sym_filter;
41 float min_percent;
42 unsigned int nr_threads_synthesize;
43};
44
45#define CONSOLE_CLEAR ""
46
47size_t perf_top__header_snprintf(struct perf_top *top, char *bf, size_t size);
48void perf_top__reset_sample_counters(struct perf_top *top);
49#endif /* __PERF_TOP_H */