Fix: lttng-save command producing wrong XML fields
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 5 Jul 2018 22:14:54 +0000 (18:14 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 7 Sep 2018 16:19:36 +0000 (12:19 -0400)
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:
  <type>KPROBE</type>
but lttng-load command would be expecting the following field:
  <type>PROBE</type>.

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 <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/save.c

index 3c6b5b8a01931540cbd050a9600f969e0076b471..834b8739eaf9de28de7047537aca4444488d0f68 100644 (file)
@@ -215,13 +215,13 @@ 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_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;
This page took 0.027248 seconds and 5 git commands to generate.