aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTzvetomir Stoyanov <tstoyanov@vmware.com>2019-01-30 12:44:20 +0200
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-03-14 11:49:29 -0400
commite523b2b7d5a0ada0436b371f7807f647bdd45fbd (patch)
treeb8653f73d64fb4e6def79b3db5974c671afee5c3
parente6e78d9636b5081ac9130703c0e3a39949221424 (diff)
downloadtrace-cmd-e523b2b7d5a0ada0436b371f7807f647bdd45fbd.tar.gz
trace-cmd: Initialize host_bigendian at tep_handle allocation
This patch initializes the host_bigendian member of the tep_handle structure with the byte order of the current host, when this handler is created - in tep_alloc() API. We need this in order to remove the tep_set_host_bigendian() API. Link: http://lore.kernel.org/linux-trace-devel/20190130104425.8813-2-tstoyanov@vmware.com Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/20181201040852.216292134@goodmis.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r--lib/traceevent/event-parse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/traceevent/event-parse.c b/lib/traceevent/event-parse.c
index 034e033d..7806f873 100644
--- a/lib/traceevent/event-parse.c
+++ b/lib/traceevent/event-parse.c
@@ -6817,8 +6817,10 @@ struct tep_handle *tep_alloc(void)
{
struct tep_handle *pevent = calloc(1, sizeof(*pevent));
- if (pevent)
+ if (pevent) {
pevent->ref_count = 1;
+ pevent->host_bigendian = tep_host_bigendian();
+ }
return pevent;
}