summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/stat.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2018-08-30 08:32:44 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-08-30 20:52:24 +0200
commit8897a8916efb29fa8bbe9e5f6e5d56362aedf64e (patch)
treed2de6ac06c7525678d0a42f9f7f9d647d77922ca /tools/perf/util/stat.h
parentperf stat: Move 'print_mixed_hw_group_error' to 'struct perf_stat_config' (diff)
downloadlinux-8897a8916efb29fa8bbe9e5f6e5d56362aedf64e.tar.xz
linux-8897a8916efb29fa8bbe9e5f6e5d56362aedf64e.zip
perf stat: Move ru_* data to 'struct perf_stat_config'
Move the 'ru_*' global variables to 'struct perf_stat_config', so that it can be passed around and used outside the 'perf stat' command. 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-36-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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h
index 6fb4dac26ccc..1fd0b7e196c6 100644
--- a/tools/perf/util/stat.h
+++ b/tools/perf/util/stat.h
@@ -4,6 +4,10 @@
#include <linux/types.h>
#include <stdio.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <sys/wait.h>
#include "xyarray.h"
#include "rblist.h"
#include "perf.h"
@@ -95,6 +99,7 @@ struct perf_stat_config {
bool interval_clear;
bool metric_only;
bool null_run;
+ bool ru_display;
FILE *output;
unsigned int interval;
unsigned int timeout;
@@ -109,6 +114,7 @@ struct perf_stat_config {
int stats_num;
const char *csv_sep;
struct stats *walltime_nsecs_stats;
+ struct rusage ru_data;
};
void update_stats(struct stats *stats, u64 val);