1
2
3
4
5
6
7
8
9
10#ifndef _IOSTAT_H
11#define _IOSTAT_H
12
13#include <subcmd/parse-options.h>
14#include "util/stat.h"
15#include "util/parse-events.h"
16#include "util/evlist.h"
17
18struct option;
19struct perf_stat_config;
20struct evlist;
21struct timespec;
22
23enum iostat_mode_t {
24 IOSTAT_NONE = -1,
25 IOSTAT_RUN = 0,
26 IOSTAT_LIST = 1
27};
28
29extern enum iostat_mode_t iostat_mode;
30
31typedef void (*iostat_print_counter_t)(struct perf_stat_config *, struct evsel *, char *);
32
33int iostat_prepare(struct evlist *evlist, struct perf_stat_config *config);
34int iostat_parse(const struct option *opt, const char *str,
35 int unset __maybe_unused);
36void iostat_list(struct evlist *evlist, struct perf_stat_config *config);
37void iostat_release(struct evlist *evlist);
38void iostat_prefix(struct evlist *evlist, struct perf_stat_config *config,
39 char *prefix, struct timespec *ts);
40void iostat_print_header_prefix(struct perf_stat_config *config);
41void iostat_print_metric(struct perf_stat_config *config, struct evsel *evsel,
42 struct perf_stat_output_ctx *out);
43void iostat_print_counters(struct evlist *evlist,
44 struct perf_stat_config *config, struct timespec *ts,
45 char *prefix, iostat_print_counter_t print_cnt_cb);
46
47#endif
48