summaryrefslogtreecommitdiff
path: root/tools/perf/util/session.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/session.h
parent0ecf4f0c02b7802de5d1251e03e6eab360f158e1 (diff)
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/session.h')
-rw-r--r--tools/perf/util/session.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 7c435bde6eb0..4d549e28248f 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -42,7 +42,6 @@ struct perf_session {
*/
struct hists hists;
u64 sample_type;
- int sample_size;
int fd;
bool fd_pipe;
bool repipe;
@@ -130,15 +129,9 @@ size_t perf_session__fprintf_dsos_buildid(struct perf_session *self,
size_t perf_session__fprintf_nr_events(struct perf_session *session, FILE *fp);
-static inline int perf_session__parse_sample(struct perf_session *session,
- const union perf_event *event,
- struct perf_sample *sample)
-{
- return perf_event__parse_sample(event, session->sample_type,
- session->sample_size,
- session->sample_id_all, sample,
- session->header.needs_swap);
-}
+int perf_session__parse_sample(struct perf_session *session,
+ const union perf_event *event,
+ struct perf_sample *sample);
static inline int perf_session__synthesize_sample(struct perf_session *session,
union perf_event *event,