From: Francis Deslauriers Date: Tue, 5 Jun 2018 16:06:53 +0000 (-0400) Subject: Implement MI and save/load support for callstack contexts X-Git-Tag: v2.11.0-rc1~163 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=16c4c9914f4e9aa1cf1a6f71f4b030fc8928e10e;p=lttng-tools.git Implement MI and save/load support for callstack contexts Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/save.c b/src/bin/lttng-sessiond/save.c index 6b1bf69c4..a8f3ec795 100644 --- a/src/bin/lttng-sessiond/save.c +++ b/src/bin/lttng-sessiond/save.c @@ -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; } diff --git a/src/common/config/config-session-abi.h b/src/common/config/config-session-abi.h index 2746c378c..c96adb9eb 100644 --- a/src/common/config/config-session-abi.h +++ b/src/common/config/config-session-abi.h @@ -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 */ diff --git a/src/common/config/session-config.c b/src/common/config/session-config.c index 518fde70b..1b0db12cc 100644 --- a/src/common/config/session-config.c +++ b/src/common/config/session-config.c @@ -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; } diff --git a/src/common/config/session.xsd b/src/common/config/session.xsd index 24259a0b8..1fdd03eb3 100644 --- a/src/common/config/session.xsd +++ b/src/common/config/session.xsd @@ -175,6 +175,8 @@ by its signed 32-bit representation when converted to msec. + + diff --git a/src/common/mi-lttng-3.0.xsd b/src/common/mi-lttng-3.0.xsd index 789fbcb9b..f9ca71094 100644 --- a/src/common/mi-lttng-3.0.xsd +++ b/src/common/mi-lttng-3.0.xsd @@ -116,6 +116,8 @@ THE SOFTWARE. + + diff --git a/src/common/mi-lttng.c b/src/common/mi-lttng.c index 01819b8bf..e8236d841 100644 --- a/src/common/mi-lttng.c +++ b/src/common/mi-lttng.c @@ -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; }