Arnaldo Carvalho de Melo | 8c3e10e | 2011-01-31 14:50:39 -0200 | [diff] [blame] | 1 | #ifndef __PERF_TOP_H |
| 2 | #define __PERF_TOP_H 1 |
| 3 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 4 | #include "tool.h" |
Arnaldo Carvalho de Melo | 8c3e10e | 2011-01-31 14:50:39 -0200 | [diff] [blame] | 5 | #include "types.h" |
Arnaldo Carvalho de Melo | 8c3e10e | 2011-01-31 14:50:39 -0200 | [diff] [blame] | 6 | #include <stddef.h> |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 7 | #include <stdbool.h> |
Irina Tirdea | 57ec0a9 | 2012-09-08 03:43:18 +0300 | [diff] [blame] | 8 | #include <termios.h> |
Arnaldo Carvalho de Melo | 8c3e10e | 2011-01-31 14:50:39 -0200 | [diff] [blame] | 9 | |
| 10 | struct perf_evlist; |
| 11 | struct perf_evsel; |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 12 | struct perf_session; |
Arnaldo Carvalho de Melo | 8c3e10e | 2011-01-31 14:50:39 -0200 | [diff] [blame] | 13 | |
Arnaldo Carvalho de Melo | 8c3e10e | 2011-01-31 14:50:39 -0200 | [diff] [blame] | 14 | struct perf_top { |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 15 | struct perf_tool tool; |
Arnaldo Carvalho de Melo | 8c3e10e | 2011-01-31 14:50:39 -0200 | [diff] [blame] | 16 | struct perf_evlist *evlist; |
Arnaldo Carvalho de Melo | b400679 | 2013-12-19 14:43:45 -0300 | [diff] [blame] | 17 | struct record_opts record_opts; |
Arnaldo Carvalho de Melo | 8c3e10e | 2011-01-31 14:50:39 -0200 | [diff] [blame] | 18 | /* |
| 19 | * Symbols will be added here in perf_event__process_sample and will |
| 20 | * get out after decayed. |
| 21 | */ |
Arnaldo Carvalho de Melo | 8c3e10e | 2011-01-31 14:50:39 -0200 | [diff] [blame] | 22 | 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 Long | 5dbb6e8 | 2013-10-18 10:38:49 -0400 | [diff] [blame] | 27 | int max_stack; |
Arnaldo Carvalho de Melo | 8c3e10e | 2011-01-31 14:50:39 -0200 | [diff] [blame] | 28 | bool hide_kernel_symbols, hide_user_symbols, zero; |
Arnaldo Carvalho de Melo | 1758af1 | 2011-11-28 09:37:05 -0200 | [diff] [blame] | 29 | bool use_tui, use_stdio; |
Arnaldo Carvalho de Melo | 1758af1 | 2011-11-28 09:37:05 -0200 | [diff] [blame] | 30 | bool kptr_restrict_warned; |
| 31 | bool vmlinux_warned; |
Arnaldo Carvalho de Melo | 1758af1 | 2011-11-28 09:37:05 -0200 | [diff] [blame] | 32 | bool dump_symtab; |
Arnaldo Carvalho de Melo | ab81f3f | 2011-10-05 19:16:15 -0300 | [diff] [blame] | 33 | struct hist_entry *sym_filter_entry; |
Arnaldo Carvalho de Melo | 8c3e10e | 2011-01-31 14:50:39 -0200 | [diff] [blame] | 34 | struct perf_evsel *sym_evsel; |
Arnaldo Carvalho de Melo | dcc101d | 2011-09-01 14:27:58 -0300 | [diff] [blame] | 35 | struct perf_session *session; |
Arnaldo Carvalho de Melo | 1758af1 | 2011-11-28 09:37:05 -0200 | [diff] [blame] | 36 | struct winsize winsize; |
Arnaldo Carvalho de Melo | 1758af1 | 2011-11-28 09:37:05 -0200 | [diff] [blame] | 37 | int realtime_prio; |
| 38 | int sym_pcnt_filter; |
| 39 | const char *sym_filter; |
Namhyung Kim | fa5df94 | 2013-05-14 11:09:05 +0900 | [diff] [blame] | 40 | float min_percent; |
Arnaldo Carvalho de Melo | 8c3e10e | 2011-01-31 14:50:39 -0200 | [diff] [blame] | 41 | }; |
| 42 | |
David Ahern | 42ee8c6 | 2013-08-02 14:05:39 -0600 | [diff] [blame] | 43 | #define CONSOLE_CLEAR "[H[2J" |
| 44 | |
Arnaldo Carvalho de Melo | 8c3e10e | 2011-01-31 14:50:39 -0200 | [diff] [blame] | 45 | size_t perf_top__header_snprintf(struct perf_top *top, char *bf, size_t size); |
| 46 | void perf_top__reset_sample_counters(struct perf_top *top); |
Arnaldo Carvalho de Melo | 8c3e10e | 2011-01-31 14:50:39 -0200 | [diff] [blame] | 47 | #endif /* __PERF_TOP_H */ |