summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evsel.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-08-01 18:53:11 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-08-01 18:53:11 -0300
commitbde09467b56c5a3cfe2a29d58edc5f7172c15184 (patch)
tree5a5bfcdd800a7fbe2a750b86f153e83e866f99c5 /tools/perf/util/evsel.h
parent0ecf4f0c02b7802de5d1251e03e6eab360f158e1 (diff)
downloadlinux-bde09467b56c5a3cfe2a29d58edc5f7172c15184.tar.gz
linux-bde09467b56c5a3cfe2a29d58edc5f7172c15184.tar.bz2
linux-bde09467b56c5a3cfe2a29d58edc5f7172c15184.zip
perf evsel: Precalculate the sample size
So that we don't have to store it in the perf_session instance, because in the future perf_session instances may have multiple evlists, each with different sample_type/sizes. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-ptod86fxkpgq3h62m9refkv4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel.h')
-rw-r--r--tools/perf/util/evsel.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 67cc5033d192..894bd77d90cc 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -65,6 +65,7 @@ struct perf_evsel {
void *func;
void *data;
} handler;
+ unsigned int sample_size;
bool supported;
};
@@ -177,13 +178,6 @@ static inline int perf_evsel__read_scaled(struct perf_evsel *evsel,
return __perf_evsel__read(evsel, ncpus, nthreads, true);
}
-int __perf_evsel__sample_size(u64 sample_type);
-
-static inline int perf_evsel__sample_size(struct perf_evsel *evsel)
-{
- return __perf_evsel__sample_size(evsel->attr.sample_type);
-}
-
void hists__init(struct hists *hists);
#endif /* __PERF_EVSEL_H */