xref: /linux/tools/perf/util/iostat.c (revision acbf6de674ef7b1b5870b25e7b3c695bf84273d0)
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 
7 __weak int iostat_prepare(struct evlist *evlist __maybe_unused,
8 			  struct perf_stat_config *config __maybe_unused)
9 {
10 	return -1;
11 }
12 
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 
21 __weak void iostat_list(struct evlist *evlist __maybe_unused,
22 		       struct perf_stat_config *config __maybe_unused)
23 {
24 }
25 
26 __weak void iostat_release(struct evlist *evlist __maybe_unused)
27 {
28 }
29 
30 __weak void iostat_print_header_prefix(struct perf_stat_config *config __maybe_unused)
31 {
32 }
33 
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 
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 
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