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