0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _IOSTAT_H
0011 #define _IOSTAT_H
0012
0013 #include <subcmd/parse-options.h>
0014 #include "util/stat.h"
0015 #include "util/parse-events.h"
0016 #include "util/evlist.h"
0017
0018 struct option;
0019 struct perf_stat_config;
0020 struct evlist;
0021 struct timespec;
0022
0023 enum iostat_mode_t {
0024 IOSTAT_NONE = -1,
0025 IOSTAT_RUN = 0,
0026 IOSTAT_LIST = 1
0027 };
0028
0029 extern enum iostat_mode_t iostat_mode;
0030
0031 typedef void (*iostat_print_counter_t)(struct perf_stat_config *, struct evsel *, char *);
0032
0033 int iostat_prepare(struct evlist *evlist, struct perf_stat_config *config);
0034 int iostat_parse(const struct option *opt, const char *str,
0035 int unset __maybe_unused);
0036 void iostat_list(struct evlist *evlist, struct perf_stat_config *config);
0037 void iostat_release(struct evlist *evlist);
0038 void iostat_prefix(struct evlist *evlist, struct perf_stat_config *config,
0039 char *prefix, struct timespec *ts);
0040 void iostat_print_header_prefix(struct perf_stat_config *config);
0041 void iostat_print_metric(struct perf_stat_config *config, struct evsel *evsel,
0042 struct perf_stat_output_ctx *out);
0043 void iostat_print_counters(struct evlist *evlist,
0044 struct perf_stat_config *config, struct timespec *ts,
0045 char *prefix, iostat_print_counter_t print_cnt_cb);
0046
0047 #endif