summaryrefslogtreecommitdiff
path: root/tools/perf/util/stat.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2015-06-14 11:19:27 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-06-16 16:34:41 +0300
commit9df38e82e2a103cf42177c164a4de9d58052ac3a (patch)
treed261b24b6eedf63d9cb8c343870d77b09b90f276 /tools/perf/util/stat.h
parenta9a3a4d92d8f2fb68f4b99d98505bebc70518599 (diff)
downloadlinux-9df38e82e2a103cf42177c164a4de9d58052ac3a.tar.xz
perf stat: Introduce perf_counts__(new|delete|reset) functions
Move 'struct perf_counts' allocation|free|reset code into separate functions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1434269985-521-13-git-send-email-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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h
index 6a782601c1c7..093dc3cb28dd 100644
--- a/tools/perf/util/stat.h
+++ b/tools/perf/util/stat.h
@@ -62,6 +62,9 @@ void perf_stat__update_shadow_stats(struct perf_evsel *counter, u64 *count,
void perf_stat__print_shadow_stats(FILE *out, struct perf_evsel *evsel,
double avg, int cpu, enum aggr_mode aggr);
+struct perf_counts *perf_counts__new(int ncpus);
+void perf_counts__delete(struct perf_counts *counts);
+
void perf_evsel__reset_counts(struct perf_evsel *evsel, int ncpus);
int perf_evsel__alloc_counts(struct perf_evsel *evsel, int ncpus);
void perf_evsel__free_counts(struct perf_evsel *evsel);