mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 07:44:21 +08:00
5f334d88c2
Now most of the print functions take a pointer to the struct outstate. We have one in the evlist__print_counters() and pass it through the child functions. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: James Clark <james.clark@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com> Link: https://lore.kernel.org/r/20221123180208.2068936-13-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
48 lines
1.4 KiB
C
48 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* perf iostat
|
|
*
|
|
* Copyright (C) 2020, Intel Corporation
|
|
*
|
|
* Authors: Alexander Antonov <alexander.antonov@linux.intel.com>
|
|
*/
|
|
|
|
#ifndef _IOSTAT_H
|
|
#define _IOSTAT_H
|
|
|
|
#include <subcmd/parse-options.h>
|
|
#include "util/stat.h"
|
|
#include "util/parse-events.h"
|
|
#include "util/evlist.h"
|
|
|
|
struct option;
|
|
struct perf_stat_config;
|
|
struct evlist;
|
|
struct timespec;
|
|
|
|
enum iostat_mode_t {
|
|
IOSTAT_NONE = -1,
|
|
IOSTAT_RUN = 0,
|
|
IOSTAT_LIST = 1
|
|
};
|
|
|
|
extern enum iostat_mode_t iostat_mode;
|
|
|
|
typedef void (*iostat_print_counter_t)(struct perf_stat_config *, struct evsel *, void *);
|
|
|
|
int iostat_prepare(struct evlist *evlist, struct perf_stat_config *config);
|
|
int iostat_parse(const struct option *opt, const char *str,
|
|
int unset __maybe_unused);
|
|
void iostat_list(struct evlist *evlist, struct perf_stat_config *config);
|
|
void iostat_release(struct evlist *evlist);
|
|
void iostat_prefix(struct evlist *evlist, struct perf_stat_config *config,
|
|
char *prefix, struct timespec *ts);
|
|
void iostat_print_header_prefix(struct perf_stat_config *config);
|
|
void iostat_print_metric(struct perf_stat_config *config, struct evsel *evsel,
|
|
struct perf_stat_output_ctx *out);
|
|
void iostat_print_counters(struct evlist *evlist,
|
|
struct perf_stat_config *config, struct timespec *ts,
|
|
char *prefix, iostat_print_counter_t print_cnt_cb, void *arg);
|
|
|
|
#endif /* _IOSTAT_H */
|