diff options
author | Jiri Olsa <jolsa@kernel.org> | 2018-08-30 08:32:11 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-08-30 15:52:21 -0300 |
commit | 728c0ee0a896fcb0957b496afdb78bf195397645 (patch) | |
tree | 8598ed0776ce07efe4f8ad33f7fc0c8050e72da0 /tools/perf/util/stat.h | |
parent | d50ed0ce820414dbe249a6ad5c9830e29cc46fcc (diff) | |
download | lwn-728c0ee0a896fcb0957b496afdb78bf195397645.tar.gz lwn-728c0ee0a896fcb0957b496afdb78bf195397645.zip |
perf stat: Move 'initial_delay' to 'struct perf_stat_config'
Move the static 'initial_delay' variable to 'struct perf_stat_config',
so it can be passed around and used outside the 'perf stat' command.
Add 'struct perf_stat_config' argument to create_perf_stat_counter() and
use its 'initial_delay' member instead of the static one.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180830063252.23729-3-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/stat.h')
-rw-r--r-- | tools/perf/util/stat.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h index 36efb986f7fc..91e6609fce6e 100644 --- a/tools/perf/util/stat.h +++ b/tools/perf/util/stat.h @@ -6,6 +6,7 @@ #include <stdio.h> #include "xyarray.h" #include "rblist.h" +#include "perf.h" struct stats { double n, mean, M2; @@ -85,14 +86,15 @@ struct runtime_stat { }; struct perf_stat_config { - enum aggr_mode aggr_mode; - bool scale; - FILE *output; - unsigned int interval; - unsigned int timeout; - int times; - struct runtime_stat *stats; - int stats_num; + enum aggr_mode aggr_mode; + bool scale; + FILE *output; + unsigned int interval; + unsigned int timeout; + unsigned int initial_delay; + int times; + struct runtime_stat *stats; + int stats_num; }; void update_stats(struct stats *stats, u64 val); |