From 9d82c4c2efc657618039baf1b9150f82b388ca96 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Thu, 5 Jul 2018 18:14:54 -0400 Subject: [PATCH] Fix: lttng-save command producing wrong XML fields MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Saving a session configuration with a probe or a function event would generate a XML file considered invalid by the lttng-load command. This is due to the fact that for a probe event lttng-save would the following xml event type field: KPROBE but lttng-load command would be expecting the following field: PROBE. As a fix, the lttng-save command now rightfully outputs the PROBE field. Given that this usecase never worked, changing the field is not a breaking change. Also, the save command was wrongfully using FUNCTION xml event type for the LTTNG_KERNEL_FUNCTION event type when it is in fact the FUNCTION_ENTRY xml event type. Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/save.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/lttng-sessiond/save.c b/src/bin/lttng-sessiond/save.c index c03b17ea8..c0684711a 100644 --- a/src/bin/lttng-sessiond/save.c +++ b/src/bin/lttng-sessiond/save.c @@ -215,16 +215,16 @@ const char *get_kernel_instrumentation_string( instrumentation_string = config_event_type_tracepoint; break; case LTTNG_KERNEL_KPROBE: - instrumentation_string = config_event_type_kprobe; + instrumentation_string = config_event_type_probe; break; case LTTNG_KERNEL_UPROBE: instrumentation_string = config_event_type_userspace_probe; break; case LTTNG_KERNEL_FUNCTION: - instrumentation_string = config_event_type_function; + instrumentation_string = config_event_type_function_entry; break; case LTTNG_KERNEL_KRETPROBE: - instrumentation_string = config_event_type_kretprobe; + instrumentation_string = config_event_type_function; break; case LTTNG_KERNEL_NOOP: instrumentation_string = config_event_type_noop; -- 2.34.1