Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __PERF_TOP_H
0003 #define __PERF_TOP_H 1
0004 
0005 #include "tool.h"
0006 #include "evswitch.h"
0007 #include "annotate.h"
0008 #include "ordered-events.h"
0009 #include "record.h"
0010 #include <linux/types.h>
0011 #include <stddef.h>
0012 #include <stdbool.h>
0013 #include <sys/ioctl.h>
0014 
0015 struct evlist;
0016 struct evsel;
0017 struct perf_session;
0018 
0019 struct perf_top {
0020     struct perf_tool   tool;
0021     struct evlist *evlist, *sb_evlist;
0022     struct record_opts record_opts;
0023     struct annotation_options annotation_opts;
0024     struct evswitch    evswitch;
0025     /*
0026      * Symbols will be added here in perf_event__process_sample and will
0027      * get out after decayed.
0028      */
0029     u64        samples, lost, lost_total, drop, drop_total;
0030     u64        kernel_samples, us_samples;
0031     u64        exact_samples;
0032     u64        guest_us_samples, guest_kernel_samples;
0033     int        print_entries, count_filter, delay_secs;
0034     int        max_stack;
0035     bool           hide_kernel_symbols, hide_user_symbols, zero;
0036 #ifdef HAVE_SLANG_SUPPORT
0037     bool           use_tui;
0038 #endif
0039     bool           use_stdio;
0040     bool           vmlinux_warned;
0041     bool           dump_symtab;
0042     bool           stitch_lbr;
0043     struct hist_entry  *sym_filter_entry;
0044     struct evsel       *sym_evsel;
0045     struct perf_session *session;
0046     struct winsize     winsize;
0047     int        realtime_prio;
0048     const char     *sym_filter;
0049     float          min_percent;
0050     unsigned int       nr_threads_synthesize;
0051 
0052     struct {
0053         struct ordered_events   *in;
0054         struct ordered_events    data[2];
0055         bool             rotate;
0056         pthread_mutex_t      mutex;
0057         pthread_cond_t       cond;
0058     } qe;
0059 };
0060 
0061 #define CONSOLE_CLEAR ""
0062 
0063 size_t perf_top__header_snprintf(struct perf_top *top, char *bf, size_t size);
0064 void perf_top__reset_sample_counters(struct perf_top *top);
0065 #endif /* __PERF_TOP_H */