1 // SPDX-License-Identifier: GPL-2.0
2 #include "util/iostat.h"
3 #include "util/debug.h"
4 
5 enum iostat_mode_t iostat_mode = IOSTAT_NONE;
6 
iostat_prepare(struct evlist * evlist __maybe_unused,struct perf_stat_config * config __maybe_unused)7 __weak int iostat_prepare(struct evlist *evlist __maybe_unused,
8 			  struct perf_stat_config *config __maybe_unused)
9 {
10 	return -1;
11 }
12 
iostat_parse(const struct option * opt __maybe_unused,const char * str __maybe_unused,int unset __maybe_unused)13 __weak int iostat_parse(const struct option *opt __maybe_unused,
14 			 const char *str __maybe_unused,
15 			 int unset __maybe_unused)
16 {
17 	pr_err("iostat mode is not supported on current platform\n");
18 	return -1;
19 }
20 
iostat_list(struct evlist * evlist __maybe_unused,struct perf_stat_config * config __maybe_unused)21 __weak void iostat_list(struct evlist *evlist __maybe_unused,
22 		       struct perf_stat_config *config __maybe_unused)
23 {
24 }
25 
iostat_release(struct evlist * evlist __maybe_unused)26 __weak void iostat_release(struct evlist *evlist __maybe_unused)
27 {
28 }
29 
iostat_print_header_prefix(struct perf_stat_config * config __maybe_unused)30 __weak void iostat_print_header_prefix(struct perf_stat_config *config __maybe_unused)
31 {
32 }
33 
iostat_print_metric(struct perf_stat_config * config __maybe_unused,struct evsel * evsel __maybe_unused,struct perf_stat_output_ctx * out __maybe_unused)34 __weak void iostat_print_metric(struct perf_stat_config *config __maybe_unused,
35 				struct evsel *evsel __maybe_unused,
36 				struct perf_stat_output_ctx *out __maybe_unused)
37 {
38 }
39 
iostat_prefix(struct evlist * evlist __maybe_unused,struct perf_stat_config * config __maybe_unused,char * prefix __maybe_unused,struct timespec * ts __maybe_unused)40 __weak void iostat_prefix(struct evlist *evlist __maybe_unused,
41 			  struct perf_stat_config *config __maybe_unused,
42 			  char *prefix __maybe_unused,
43 			  struct timespec *ts __maybe_unused)
44 {
45 }
46 
iostat_print_counters(struct evlist * evlist __maybe_unused,struct perf_stat_config * config __maybe_unused,struct timespec * ts __maybe_unused,char * prefix __maybe_unused,iostat_print_counter_t print_cnt_cb __maybe_unused,void * arg __maybe_unused)47 __weak void iostat_print_counters(struct evlist *evlist __maybe_unused,
48 				  struct perf_stat_config *config __maybe_unused,
49 				  struct timespec *ts __maybe_unused,
50 				  char *prefix __maybe_unused,
51 				  iostat_print_counter_t print_cnt_cb __maybe_unused,
52 				  void *arg __maybe_unused)
53 {
54 }
55