Implement MI and save/load support for callstack contexts
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 5 Jun 2018 16:06:53 +0000 (12:06 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 11 Jun 2018 19:21:51 +0000 (15:21 -0400)
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
src/common/config/config-session-abi.h
src/common/config/session-config.c
src/common/config/session.xsd
src/common/mi-lttng-3.0.xsd
src/common/mi-lttng.c

index 6b1bf69c424ab1bd18f67a342d4208594f3821fc..a8f3ec79588e7bf1e09d6a39c7dd861bf400ecab 100644 (file)
@@ -285,6 +285,12 @@ const char *get_kernel_context_type_string(
        case LTTNG_KERNEL_CONTEXT_MIGRATABLE:
                context_type_string = config_event_context_migratable;
                break;
+       case LTTNG_KERNEL_CONTEXT_CALLSTACK_USER:
+               context_type_string = config_event_context_callstack_user;
+               break;
+       case LTTNG_KERNEL_CONTEXT_CALLSTACK_KERNEL:
+               context_type_string = config_event_context_callstack_kernel;
+               break;
        default:
                context_type_string = NULL;
        }
index 2746c378c1301a04e2a52ce9d0e45151967ad218..c96adb9ebf5886c479296caf0244a5d8c494edf9 100644 (file)
@@ -132,5 +132,7 @@ extern const char * const config_event_context_interruptible;
 extern const char * const config_event_context_preemptible;
 extern const char * const config_event_context_need_reschedule;
 extern const char * const config_event_context_migratable;
+extern const char * const config_event_context_callstack_user;
+extern const char * const config_event_context_callstack_kernel;
 
 #endif /* CONFIG_SESSION_INTERNAL_H */
index 518fde70b5e63d1d244369ca634d0a647bb75f21..1b0db12cc8d448ea175192c28861a3a170edaed8 100644 (file)
@@ -185,6 +185,8 @@ LTTNG_HIDDEN const char * const config_event_context_interruptible = "INTERRUPTI
 LTTNG_HIDDEN const char * const config_event_context_preemptible = "PREEMPTIBLE";
 LTTNG_HIDDEN const char * const config_event_context_need_reschedule = "NEED_RESCHEDULE";
 LTTNG_HIDDEN const char * const config_event_context_migratable = "MIGRATABLE";
+LTTNG_HIDDEN const char * const config_event_context_callstack_user= "CALLSTACK_USER";
+LTTNG_HIDDEN const char * const config_event_context_callstack_kernel = "CALLSTACK_KERNEL";
 
 /* Deprecated symbols */
 const char * const config_element_perf;
@@ -1018,6 +1020,12 @@ int get_context_type(xmlChar *context_type)
        } else if (!strcmp((char *) context_type,
                config_event_context_migratable)) {
                ret = LTTNG_EVENT_CONTEXT_MIGRATABLE;
+       } else if (!strcmp((char *) context_type,
+               config_event_context_callstack_user)) {
+               ret = LTTNG_EVENT_CONTEXT_CALLSTACK_USER;
+       } else if (!strcmp((char *) context_type,
+               config_event_context_callstack_kernel)) {
+               ret = LTTNG_EVENT_CONTEXT_CALLSTACK_KERNEL;
        } else {
                goto error;
        }
index 24259a0b8bb561914469a667f9b574b06f5efa3c..1fdd03eb388c787858d72df1761f2a36c5a08276 100644 (file)
@@ -175,6 +175,8 @@ by its signed 32-bit representation when converted to msec.
                <xs:enumeration value="PREEMPTIBLE" />
                <xs:enumeration value="NEED_RESCHEDULE" />
                <xs:enumeration value="MIGRATABLE" />
+               <xs:enumeration value="CALLSTACK_USER" />
+               <xs:enumeration value="CALLSTACK_KERNEL" />
        </xs:restriction>
 </xs:simpleType>
 
index 789fbcb9b48554d4f3544c4b03e8ec85e95a7000..f9ca71094ec355f14209dbaad29e400d7071b08e 100644 (file)
@@ -116,6 +116,8 @@ THE SOFTWARE.
                        <xs:enumeration value="PREEMPTIBLE" />
                        <xs:enumeration value="NEED_RESCHEDULE" />
                        <xs:enumeration value="MIGRATABLE" />
+                       <xs:enumeration value="CALLSTACK_USER" />
+                       <xs:enumeration value="CALLSTACK_KERNEL" />
                </xs:restriction>
        </xs:simpleType>
 
index 01819b8bf310dead40c96f447cea38eaf639e428..e8236d841300650a4f8b68b92a8dbf6e6ac5416e 100644 (file)
@@ -397,6 +397,10 @@ const char *mi_lttng_event_contexttype_string(enum lttng_event_context_type val)
                return config_event_context_need_reschedule;
        case LTTNG_EVENT_CONTEXT_MIGRATABLE:
                return config_event_context_migratable;
+       case LTTNG_EVENT_CONTEXT_CALLSTACK_USER:
+               return config_event_context_callstack_user;
+       case LTTNG_EVENT_CONTEXT_CALLSTACK_KERNEL:
+               return config_event_context_callstack_kernel;
        default:
                return NULL;
        }
This page took 0.02923 seconds and 4 git commands to generate.