aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/traceevent/event-parse.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2013-06-04 01:20:20 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-07-12 12:52:14 -0400
commit012ac692575b1ea6ed930871850584e4c64f1382 (patch)
treef07ba011d00a22833edc9d79986a055dc2b4c23c /tools/lib/traceevent/event-parse.h
parent6a48aec3a7179b0cdae2339d5a4072214ee6c6fe (diff)
tools lib traceevent: Add page_size field to pevent
The page size of traced system can be different than current system's because the recorded data file might be analyzed in a different machine. In this case we should use original page size of traced system when accessing the data file, so this information needs to be saved. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1370323231-14022-6-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/traceevent/event-parse.h')
-rw-r--r--tools/lib/traceevent/event-parse.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index 39f0c1dca915..c37b2026d04a 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -400,6 +400,7 @@ struct pevent {
400 400
401 int cpus; 401 int cpus;
402 int long_size; 402 int long_size;
403 int page_size;
403 404
404 struct cmdline *cmdlines; 405 struct cmdline *cmdlines;
405 struct cmdline_list *cmdlist; 406 struct cmdline_list *cmdlist;
@@ -621,6 +622,16 @@ static inline void pevent_set_long_size(struct pevent *pevent, int long_size)
621 pevent->long_size = long_size; 622 pevent->long_size = long_size;
622} 623}
623 624
625static inline int pevent_get_page_size(struct pevent *pevent)
626{
627 return pevent->page_size;
628}
629
630static inline void pevent_set_page_size(struct pevent *pevent, int _page_size)
631{
632 pevent->page_size = _page_size;
633}
634
624static inline int pevent_is_file_bigendian(struct pevent *pevent) 635static inline int pevent_is_file_bigendian(struct pevent *pevent)
625{ 636{
626 return pevent->file_bigendian; 637 return pevent->file_bigendian;