Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libtraceevent for openSUSE:Factory checked in at 2025-12-30 12:00:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libtraceevent (Old) and /work/SRC/openSUSE:Factory/.libtraceevent.new.1928 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libtraceevent" Tue Dec 30 12:00:20 2025 rev:16 rq:1324620 version:1.8.6 Changes: -------- --- /work/SRC/openSUSE:Factory/libtraceevent/libtraceevent.changes 2025-04-02 17:05:50.306425945 +0200 +++ /work/SRC/openSUSE:Factory/.libtraceevent.new.1928/libtraceevent.changes 2025-12-30 12:00:28.608837537 +0100 @@ -1,0 +2,11 @@ +Sun Dec 28 23:46:04 UTC 2025 - Dirk Müller <[email protected]> + +- update to 1.8.6: + * libtraceevent plugins: Add plugin_net to handle byte swap + during print + * libtraceevent: Return error on event parsing if format parsing + fails + * libtraceevent: Add support for nested ?: conditionals + * libtraceevent: Add support for __print_dynamic_array() macro + +------------------------------------------------------------------- Old: ---- libtraceevent-1.8.4.tar.gz New: ---- libtraceevent-1.8.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libtraceevent.spec ++++++ --- /var/tmp/diff_new_pack.tbgVOU/_old 2025-12-30 12:00:30.872930540 +0100 +++ /var/tmp/diff_new_pack.tbgVOU/_new 2025-12-30 12:00:30.896931525 +0100 @@ -1,7 +1,7 @@ # # spec file for package libtraceevent # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,7 +22,7 @@ %define sodname %{dname}%{sonum} Name: libtraceevent -Version: 1.8.4 +Version: 1.8.6 Release: 0 Summary: Linux kernel trace event library License: GPL-2.0-only AND LGPL-2.1-only ++++++ libtraceevent-1.8.4.tar.gz -> libtraceevent-1.8.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.4/Makefile new/libtraceevent-1.8.6/Makefile --- old/libtraceevent-1.8.4/Makefile 2024-10-11 23:26:45.000000000 +0200 +++ new/libtraceevent-1.8.6/Makefile 2025-11-14 20:35:19.000000000 +0100 @@ -2,7 +2,7 @@ # libtraceevent version EP_VERSION = 1 EP_PATCHLEVEL = 8 -EP_EXTRAVERSION = 4 +EP_EXTRAVERSION = 6 EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION) MAKEFLAGS += --no-print-directory @@ -114,7 +114,7 @@ OBJ = $@ N = -LIBTRACEEVENT_STATIC = $(bdir)/libtraceevent.a +LIBTRACEEVENT_STATIC ?= $(bdir)/libtraceevent.a LIBTRACEEVENT_SHARED = $(bdir)/libtraceevent.so.$(EVENT_PARSE_VERSION) EP_HEADERS_DIR = $(src)/include/traceevent @@ -317,8 +317,8 @@ if $(LDCONFIG); then \ if ! grep -q "^$(libdir)$$" $(LD_SO_CONF_PATH)/* ; then \ $(CC) -o $(objtree)/test $(srctree)/test.c -I $(includedir_SQ) \ - -L $(libdir_SQ) -ltraceevent &> /dev/null; \ - if ! $(objtree)/test &> /dev/null; then \ + -L $(libdir_SQ) -ltraceevent > /dev/null 2>&1; \ + if ! $(objtree)/test > /dev/null 2>&1; then \ $(call print_install, trace.conf, $(LD_SO_CONF_PATH)) \ echo $(libdir_SQ) >> $(LD_SO_CONF_PATH)/trace.conf; \ $(LDCONFIG); \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.4/Makefile.meson new/libtraceevent-1.8.6/Makefile.meson --- old/libtraceevent-1.8.4/Makefile.meson 2024-10-11 23:26:45.000000000 +0200 +++ new/libtraceevent-1.8.6/Makefile.meson 2025-11-14 20:35:19.000000000 +0100 @@ -16,17 +16,28 @@ $(call allow-override,MESON,meson) $(call allow-override,MESON_BUILD_DIR,build) +include $(src)/scripts/utils.mk -all: compile +LIBTRACEEVENT_SHARED_MESON = $(srctree)/build/src/libtraceevent.so +LIBTRACEEVENT_STATIC_MESON = $(srctree)/build/src/libtraceevent.a +TEMP_MESON = $(srctree)/build/src/.tmp.libtraceevent.a + +all: $(LIBTRACEEVENT_STATIC_MESON) $(LIBTRACEEVENT_SHARED_MESON) PHONY += compile compile: $(MESON_BUILD_DIR) force $(MESON) compile -C $(MESON_BUILD_DIR) +$(LIBTRACEEVENT_SHARED_MESON): compile + +$(LIBTRACEEVENT_STATIC_MESON): $(LIBTRACEEVENT_SHARED_MESON) + $(Q)objcopy $(call redefine_local,$(LIBTRACEEVENT_SHARED_MESON)) $(LIBTRACEEVENT_STATIC_MESON) $(TEMP_MESON) + mv $(TEMP_MESON) $(LIBTRACEEVENT_STATIC_MESON) + $(MESON_BUILD_DIR): $(MESON) setup --prefix=$(prefix) $(MESON_BUILD_DIR) -install: compile +install: $(LIBTRACEEVENT_STATIC_MESON) $(MESON) install -C $(MESON_BUILD_DIR) docs: $(MESON_BUILD_DIR) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.4/include/traceevent/event-parse.h new/libtraceevent-1.8.6/include/traceevent/event-parse.h --- old/libtraceevent-1.8.4/include/traceevent/event-parse.h 2024-10-11 23:26:45.000000000 +0200 +++ new/libtraceevent-1.8.6/include/traceevent/event-parse.h 2025-11-14 20:35:19.000000000 +0100 @@ -82,43 +82,13 @@ * * int TEP_PLUGIN_UNLOADER(struct tep_handle *tep) * - * TEP_PLUGIN_OPTIONS: (optional) - * Plugin options that can be set before loading - * - * struct tep_plugin_option TEP_PLUGIN_OPTIONS[] = { - * { - * .name = "option-name", - * .plugin_alias = "override-file-name", (optional) - * .description = "description of option to show users", - * }, - * { - * .name = NULL, - * }, - * }; - * - * Array must end with .name = NULL; - * - * - * .plugin_alias is used to give a shorter name to access - * the vairable. Useful if a plugin handles more than one event. - * - * If .value is not set, then it is considered a boolean and only - * .set will be processed. If .value is defined, then it is considered - * a string option and .set will be ignored. - * - * TEP_PLUGIN_ALIAS: (optional) - * The name to use for finding options (uses filename if not defined) */ #define TEP_PLUGIN_LOADER tep_plugin_loader #define TEP_PLUGIN_UNLOADER tep_plugin_unloader -#define TEP_PLUGIN_OPTIONS tep_plugin_options -#define TEP_PLUGIN_ALIAS tep_plugin_alias #define _MAKE_STR(x) #x #define MAKE_STR(x) _MAKE_STR(x) #define TEP_PLUGIN_LOADER_NAME MAKE_STR(TEP_PLUGIN_LOADER) #define TEP_PLUGIN_UNLOADER_NAME MAKE_STR(TEP_PLUGIN_UNLOADER) -#define TEP_PLUGIN_OPTIONS_NAME MAKE_STR(TEP_PLUGIN_OPTIONS) -#define TEP_PLUGIN_ALIAS_NAME MAKE_STR(TEP_PLUGIN_ALIAS) enum tep_format_flags { TEP_FIELD_IS_ARRAY = 1, @@ -332,6 +302,8 @@ TEP_NSEC_OUTPUT = 1, /* output in NSECS */ TEP_DISABLE_SYS_PLUGINS = 1 << 1, TEP_DISABLE_PLUGINS = 1 << 2, + TEP_NO_PARSING_WARNINGS = 1 << 3, /* Disable warnings while parsing + event's format strings */ }; #define TEP_ERRORS \ @@ -436,7 +408,7 @@ /* taken from kernel/trace/trace.h */ enum trace_flag_type { TRACE_FLAG_IRQS_OFF = 0x01, - TRACE_FLAG_IRQS_NOSUPPORT = 0x02, + TRACE_FLAG_NEED_RESCHED_LAZY = 0x02, TRACE_FLAG_NEED_RESCHED = 0x04, TRACE_FLAG_HARDIRQ = 0x08, TRACE_FLAG_SOFTIRQ = 0x10, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.4/meson.build new/libtraceevent-1.8.6/meson.build --- old/libtraceevent-1.8.4/meson.build 2024-10-11 23:26:45.000000000 +0200 +++ new/libtraceevent-1.8.6/meson.build 2025-11-14 20:35:19.000000000 +0100 @@ -6,7 +6,7 @@ 'libtraceevent', ['c'], meson_version: '>= 0.58.0', license: 'LGPL-2.1', - version: '1.8.4', + version: '1.8.6', default_options: [ 'c_std=gnu99', 'buildtype=debug', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.4/plugins/Makefile new/libtraceevent-1.8.6/plugins/Makefile --- old/libtraceevent-1.8.4/plugins/Makefile 2024-10-11 23:26:45.000000000 +0200 +++ new/libtraceevent-1.8.6/plugins/Makefile 2025-11-14 20:35:19.000000000 +0100 @@ -91,6 +91,7 @@ PLUGINS += plugin_kmem.so PLUGINS += plugin_kvm.so PLUGINS += plugin_mac80211.so +PLUGINS += plugin_net.so PLUGINS += plugin_sched_switch.so PLUGINS += plugin_function.so PLUGINS += plugin_futex.so diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.4/plugins/meson.build new/libtraceevent-1.8.6/plugins/meson.build --- old/libtraceevent-1.8.4/plugins/meson.build 2024-10-11 23:26:45.000000000 +0200 +++ new/libtraceevent-1.8.6/plugins/meson.build 2025-11-14 20:35:19.000000000 +0100 @@ -11,6 +11,7 @@ 'plugin_kmem.c', 'plugin_kvm.c', 'plugin_mac80211.c', + 'plugin_net.c', 'plugin_sched_switch.c', 'plugin_scsi.c', 'plugin_tlb.c', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.4/plugins/plugin_function.c new/libtraceevent-1.8.6/plugins/plugin_function.c --- old/libtraceevent-1.8.4/plugins/plugin_function.c 2024-10-11 23:26:45.000000000 +0200 +++ new/libtraceevent-1.8.6/plugins/plugin_function.c 2025-11-14 20:35:19.000000000 +0100 @@ -133,6 +133,39 @@ } } +/* Returns true if it printed args, otherwise it returns false */ +static bool print_args(struct trace_seq *s, struct tep_event *event, + struct tep_record *record) +{ + struct tep_format_field *field; + unsigned long arg; + void *args; + int len; + + field = tep_find_field(event, "args"); + if (!field) + return false; + + len = record->size - field->offset; + + /* todo make this tep long size */ + if (len < 3 * sizeof(long)) + return false; + + args = record->data + field->offset; + + trace_seq_putc(s, '('); + + for (int i = 0; i < len; i += sizeof(long), args += sizeof(long)) { + memcpy(&arg, args, sizeof(long)); + trace_seq_printf(s, "%lx", arg); + if (i + sizeof(long) < len) + trace_seq_puts(s, ", "); + } + trace_seq_putc(s, ')'); + return true; +} + static int function_handler(struct trace_seq *s, struct tep_record *record, struct tep_event *event, void *context) { @@ -163,6 +196,8 @@ else trace_seq_printf(s, "0x%llx", function); + print_args(s, event, record); + if (ftrace_parent->set) { trace_seq_printf(s, " <-- "); if (parent) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.4/plugins/plugin_net.c new/libtraceevent-1.8.6/plugins/plugin_net.c --- old/libtraceevent-1.8.4/plugins/plugin_net.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libtraceevent-1.8.6/plugins/plugin_net.c 2025-11-14 20:35:19.000000000 +0100 @@ -0,0 +1,94 @@ +// SPDX-License-Identifier: LGPL-2.1 +#include <stdint.h> + +#include "event-parse.h" +#include "trace-seq.h" + +static unsigned long long +process_builtin_constant_p(struct trace_seq *s, unsigned long long *args) +{ + return 0; +} + +static unsigned long long +process_builtin_bswap16(struct trace_seq *s, unsigned long long *args) +{ + return __builtin_bswap16((uint16_t)args[0]); +} + +static unsigned long long +process_builtin_bswap32(struct trace_seq *s, unsigned long long *args) +{ + return __builtin_bswap32((uint32_t)args[0]); +} + +static unsigned long long +process_builtin_bswap64(struct trace_seq *s, unsigned long long *args) +{ + return __builtin_bswap64(args[0]); +} + +int TEP_PLUGIN_LOADER(struct tep_handle *tep) +{ + tep_register_print_function(tep, + process_builtin_constant_p, + TEP_FUNC_ARG_INT, + "__builtin_constant_p", + TEP_FUNC_ARG_INT, + TEP_FUNC_ARG_VOID); + tep_register_print_function(tep, + process_builtin_bswap16, + TEP_FUNC_ARG_INT, + "__fswab16", + TEP_FUNC_ARG_INT, + TEP_FUNC_ARG_VOID); + tep_register_print_function(tep, + process_builtin_bswap16, + TEP_FUNC_ARG_INT, + "__builtin_bswap16", + TEP_FUNC_ARG_INT, + TEP_FUNC_ARG_VOID); + tep_register_print_function(tep, + process_builtin_bswap32, + TEP_FUNC_ARG_INT, + "__fswab32", + TEP_FUNC_ARG_INT, + TEP_FUNC_ARG_VOID); + tep_register_print_function(tep, + process_builtin_bswap32, + TEP_FUNC_ARG_INT, + "__builtin_bswap32", + TEP_FUNC_ARG_INT, + TEP_FUNC_ARG_VOID); + tep_register_print_function(tep, + process_builtin_bswap64, + TEP_FUNC_ARG_LONG, + "__fswab64", + TEP_FUNC_ARG_LONG, + TEP_FUNC_ARG_VOID); + tep_register_print_function(tep, + process_builtin_bswap64, + TEP_FUNC_ARG_LONG, + "__builtin_bswap64", + TEP_FUNC_ARG_LONG, + TEP_FUNC_ARG_VOID); + return 0; +} + +void TEP_PLUGIN_UNLOADER(struct tep_handle *tep) +{ + tep_unregister_print_function(tep, process_builtin_constant_p, + "__builtin_constant_p"); + tep_unregister_print_function(tep, process_builtin_bswap16, + "__fswab16"); + tep_unregister_print_function(tep, process_builtin_bswap16, + "__builtin_bswap16"); + tep_unregister_print_function(tep, process_builtin_bswap32, + "__fswab32"); + tep_unregister_print_function(tep, process_builtin_bswap32, + "__builtin_bswap32"); + tep_unregister_print_function(tep, process_builtin_bswap64, + "__fswab64"); + tep_unregister_print_function(tep, process_builtin_bswap64, + "__builtin_bswap64"); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.4/scripts/utils.mk new/libtraceevent-1.8.6/scripts/utils.mk --- old/libtraceevent-1.8.4/scripts/utils.mk 2024-10-11 23:26:45.000000000 +0200 +++ new/libtraceevent-1.8.6/scripts/utils.mk 2025-11-14 20:35:19.000000000 +0100 @@ -180,3 +180,8 @@ (echo Failed to locate pkg-config directory) 1>&2; \ fi endef + +# Make all global functions that do not start with "tep_" have a unique name. +redefine_local = \ + $(shell for f in a `nm $(1) 2>/dev/null | grep ' t ' | cut -d' ' -f3 | sort -u`; do \ + if [ "$${f#tep_}" = "$$f" ]; then echo --redefine-sym $$f=_tep_local_$$f; fi; done) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.4/src/Makefile new/libtraceevent-1.8.6/src/Makefile --- old/libtraceevent-1.8.4/src/Makefile 2024-10-11 23:26:45.000000000 +0200 +++ new/libtraceevent-1.8.6/src/Makefile 2025-11-14 20:35:19.000000000 +0100 @@ -18,7 +18,10 @@ $(bdir)/%.o: %.c $(Q)$(call do_fpic_compile) -$(LIBTRACEEVENT_STATIC): $(OBJS) +$(LIBTRACEEVENT_STATIC): $(bdir)/.tmp.libtraceevent.a $(LIBTRACEEVENT_SHARED) + $(Q)objcopy $(call redefine_local,${LIBTRACEEVENT_SHARED}) $< $@ + +$(bdir)/.tmp.libtraceevent.a: $(OBJS) $(Q)$(call do_build_static_lib) $(LIBTRACEEVENT_SHARED): $(OBJS) @@ -44,7 +47,8 @@ $(DEPS): | $(bdir) clean: - $(Q)$(call do_clean,$(OBJS) $(DEPS)) + $(Q)$(call do_clean,$(OBJS) $(DEPS) $(bdir)/libtraceevent.o \ + $(bdir)/.tmp.libtraceevent.a) dep_includes := $(wildcard $(DEPS)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.4/src/event-parse.c new/libtraceevent-1.8.6/src/event-parse.c --- old/libtraceevent-1.8.4/src/event-parse.c 2024-10-11 23:26:45.000000000 +0200 +++ new/libtraceevent-1.8.6/src/event-parse.c 2025-11-14 20:35:19.000000000 +0100 @@ -1307,7 +1307,7 @@ /* Break out if the file is corrupted and giving non print chars */ if (ch <= 0) break; - } while ((ch != quote_ch && isprint(ch)) || last_ch == '\\' || ch == '\n'); + } while ((ch != quote_ch && isprint(ch)) || last_ch == '\\' || ch == '\n' || ch == '\t'); /* remove the last quote */ i--; @@ -2083,6 +2083,16 @@ type = process_arg(event, right, &token); + againagain: + if (type == TEP_EVENT_ERROR) + goto out_free; + + /* Handle other operations in the results */ + if (type == TEP_EVENT_OP) { + type = process_op(event, right, &token); + goto againagain; + } + top->op.right = arg; *tok = token; @@ -2498,6 +2508,10 @@ /* higher prios need to be closer to the root */ prio = get_op_prio(*tok); + if (prio < 0) { + token = *tok; + goto out_free; + } if (prio > arg->op.prio) return process_op(event, arg, tok); @@ -3157,6 +3171,54 @@ } static enum tep_event_type +process_int_dynamic_array(struct tep_event *event, struct tep_print_arg *arg, char **tok) +{ + struct tep_format_field *field; + enum tep_event_type type; + char *token; + + memset(arg, 0, sizeof(*arg)); + arg->type = TEP_PRINT_INT_ARRAY; + + /* + * The first item within the parenthesis is another field that holds + * the index into where the array starts. + */ + type = read_token(event->tep, &token); + if (type != TEP_EVENT_ITEM) + return TEP_EVENT_ERROR; + + /* Find the field */ + field = tep_find_field(event, token); + if (!field) + goto out; + + if (read_expected(event->tep, TEP_EVENT_DELIM, ",") < 0) + goto out; + + arg->int_array.count = NULL; + + if (alloc_and_process_delim(event, ")", &arg->int_array.el_size)) + goto out; + + arg->int_array.field = alloc_arg(); + if (!arg) { + do_warning_event(event, "%s: not enough memory!", __func__); + goto out; + } + + arg->int_array.field->type = TEP_PRINT_DYNAMIC_ARRAY; + arg->int_array.field->dynarray.field = field; + arg->int_array.field->dynarray.index = 0; + + return read_token_item(event->tep, tok); +out: + free_token(token); + *tok = NULL; + return TEP_EVENT_ERROR; +} + +static enum tep_event_type process_dynamic_array(struct tep_event *event, struct tep_print_arg *arg, char **tok) { struct tep_format_field *field; @@ -3657,6 +3719,10 @@ free_token(token); return process_int_array(event, arg, tok); } + if (strcmp(token, "__print_dynamic_array") == 0) { + free_token(token); + return process_int_dynamic_array(event, arg, tok); + } if (strcmp(token, "__get_str") == 0 || strcmp(token, "__get_rel_str") == 0) { free_token(token); @@ -4937,9 +5003,11 @@ void *num; int el_size; + len = 0; + if (arg->int_array.field->type == TEP_PRINT_DYNAMIC_ARRAY) { dynamic_offset_field(tep, arg->int_array.field->dynarray.field, data, - size, &offset, NULL); + size, &offset, &len); num = data + offset; } else { field = arg->int_array.field->field.field; @@ -4952,9 +5020,16 @@ } num = data + field->offset; } - len = eval_num_arg(data, size, event, arg->int_array.count); el_size = eval_num_arg(data, size, event, arg->int_array.el_size); + + if (arg->int_array.count) { + len = eval_num_arg(data, size, event, arg->int_array.count); + } else { + /* __print_dynamic_array() has a dynamic count */ + if (el_size) + len /= el_size; + } trace_seq_putc(s, '{'); for (i = 0; i < len; i++) { if (i) @@ -6805,11 +6880,9 @@ softirq = lat_flags & TRACE_FLAG_SOFTIRQ; trace_seq_printf(&sq, "%c%c%c", - (lat_flags & TRACE_FLAG_IRQS_OFF) ? 'd' : - (lat_flags & TRACE_FLAG_IRQS_NOSUPPORT) ? - 'X' : '.', + (lat_flags & TRACE_FLAG_IRQS_OFF) ? 'd' : '.', (lat_flags & TRACE_FLAG_NEED_RESCHED) ? - 'N' : '.', + 'N' : (lat_flags & TRACE_FLAG_NEED_RESCHED_LAZY) ? 'L' :'.', (hardirq && softirq) ? 'H' : hardirq ? 'h' : softirq ? 's' : '.'); @@ -7792,6 +7865,7 @@ struct tep_handle *tep, const char *buf, unsigned long size, const char *sys) { + int show_warning_state = show_warning; struct tep_event *event; int ret; @@ -7837,18 +7911,19 @@ ret = event_read_format(event); if (ret < 0) { ret = TEP_ERRNO__READ_FORMAT_FAILED; - goto event_parse_failed; + goto event_alloc_failed; } /* * If the event has an override, don't print warnings if the event * print format fails to parse. */ - if (tep && find_event_handle(tep, event)) + if (tep && (tep_test_flag(tep, TEP_NO_PARSING_WARNINGS) || + find_event_handle(tep, event))) show_warning = 0; ret = event_read_print(event); - show_warning = 1; + show_warning = show_warning_state; if (ret < 0) { ret = TEP_ERRNO__READ_PRINT_FAILED; @@ -8501,6 +8576,14 @@ if (tep) { tep->ref_count = 1; tep->host_bigendian = tep_is_bigendian(); + + /* + * We can make the following safe assumption + * for the default case. Else it leaves the + * file endianness as little endian and breaks + * things on big endian architectures. + */ + tep->file_bigendian = tep->host_bigendian; } return tep; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.4/src/event-plugin.c new/libtraceevent-1.8.6/src/event-plugin.c --- old/libtraceevent-1.8.4/src/event-plugin.c 2024-10-11 23:26:45.000000000 +0200 +++ new/libtraceevent-1.8.6/src/event-plugin.c 2025-11-14 20:35:19.000000000 +0100 @@ -444,10 +444,8 @@ const char *file, void *data) { struct tep_plugin_list **plugin_list = data; - struct tep_plugin_option *options; tep_plugin_load_func func; struct tep_plugin_list *list; - const char *alias; char *plugin; void *handle; int ret; @@ -465,20 +463,6 @@ goto out_free; } - alias = dlsym(handle, TEP_PLUGIN_ALIAS_NAME); - if (!alias) - alias = file; - - options = dlsym(handle, TEP_PLUGIN_OPTIONS_NAME); - if (options) { - while (options->name) { - ret = update_option(alias, options); - if (ret < 0) - goto out_close; - options++; - } - } - func = dlsym(handle, TEP_PLUGIN_LOADER_NAME); if (!func) { tep_warning("could not find func '%s' in plugin '%s'\n%s\n", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.4/src/kbuffer-parse.c new/libtraceevent-1.8.6/src/kbuffer-parse.c --- old/libtraceevent-1.8.4/src/kbuffer-parse.c 2024-10-11 23:26:45.000000000 +0200 +++ new/libtraceevent-1.8.6/src/kbuffer-parse.c 2025-11-14 20:35:19.000000000 +0100 @@ -247,7 +247,7 @@ if (host_is_bigendian()) { if (endian == KBUFFER_ENDIAN_SAME_AS_HOST) - flags |= KBUFFER_FL_BIG_ENDIAN; + kbuf->flags |= KBUFFER_FL_BIG_ENDIAN; kbuf->flags |= KBUFFER_FL_HOST_BIG_ENDIAN; } @@ -958,6 +958,7 @@ unsigned long long ts; unsigned int type_len_ts; bool do_swap = false; + int buf_len = len; int last_next; int save_curr; @@ -1009,6 +1010,33 @@ write_4(do_swap, buffer + kbuf->start, type_len_ts); + /* + * If reading the first event and there are lost events, add it + * to the buffer. + */ + if (!save_curr && kbuf->lost_events) { + unsigned long long cnt_8; + unsigned int cnt_4; + int word_size; + + if (kbuf->flags & KBUFFER_FL_LONG_8) + word_size = sizeof(cnt_8); + else + word_size = sizeof(cnt_4); + + if (len + kbuf->start <= word_size + buf_len) { + if (word_size == sizeof(cnt_8)) { + cnt_8 = kbuf->lost_events; + write_8(do_swap, buffer + len + kbuf->start, cnt_8); + } else { + cnt_4 = kbuf->lost_events; + write_4(do_swap, buffer + len + kbuf->start, cnt_4); + } + len |= MISSING_STORED; + } + len |= MISSING_EVENTS; + } + /* Update the size */ if (kbuf->read_long == __read_long_8) write_8(do_swap, buffer + 8, len);
