Skip to contentSkip to conversation

trace-cmd: remove obsolete tep_set_local_bigendian() call

PATCH New Wenjun Huo 1 participant 1 message Dec 27, 2025

lore
Share & tools
lore

Wenjun Huo

author
#0 lore raw

PATCH 1/1 trace-cmd: remove obsolete tep_set_local_bigendian() call

The tep_set_local_bigendian() call in tracecmd_alloc_fd() is obsolete because tep_alloc() already initializes the host endianness. This was a legacy from commit cd001f7b40f9d ("Add handler to pevent functions") when pevent_alloc() did not initialize host_bigendian.

The removal has been functionally tested by recording a trace on an x86 (little-endian) host and successfully reporting it on an s390x (big-endian) virtual machine, confirming endianness conversion works correctly without this line.

---
 lib/trace-cmd/trace-input.c | 1 -
 1 file changed, 1 deletion(-)
lib/trace-cmd/trace-input.c +0 -1
index f2471c92..95a8de53 100644
@@ -4942,7 +4942,6 @@ struct tracecmd_input *tracecmd_alloc_fd(int fd, int flags)
 	handle->plugin_list = tcmd_load_plugins(handle->pevent, flags);
 
 	tep_set_file_bigendian(handle->pevent, buf[0]);
-	tep_set_local_bigendian(handle->pevent, tracecmd_host_bigendian());
 
 	do_read_check(handle, buf, 1);
 	handle->long_size = buf[0];
Signature · 1 line
2.43.0