From: Jonathan Rajotte Julien Date: Mon, 9 Jun 2014 19:45:39 +0000 (-0400) Subject: Fix: missing context type string in save for ust context X-Git-Tag: v2.5.0-rc2~10 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e885a3672f53d6063fd9e2d106b341fd9c0b182c;p=lttng-tools.git Fix: missing context type string in save for ust context Return string for LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER was missing and caused an error on save when a context of PERF_THREAD_COUNTER type was present (Error: Invalid parameter). Fixes #804 Signed-off-by: Jonathan Rajotte Julien Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/save.c b/src/bin/lttng-sessiond/save.c index 18d303cac..8afdbb500 100644 --- a/src/bin/lttng-sessiond/save.c +++ b/src/bin/lttng-sessiond/save.c @@ -258,8 +258,12 @@ const char *get_ust_context_type_string( case LTTNG_UST_CONTEXT_PTHREAD_ID: context_type_string = config_event_context_pthread_id; break; + case LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER: + context_type_string = config_event_context_perf_thread_counter; + break; default: context_type_string = NULL; + break; } return context_type_string; diff --git a/src/common/config/config-session-abi.h b/src/common/config/config-session-abi.h index 3c5188362..0efd391d5 100644 --- a/src/common/config/config-session-abi.h +++ b/src/common/config/config-session-abi.h @@ -106,5 +106,6 @@ const char * const config_event_context_vppid; const char * const config_event_context_pthread_id; const char * const config_event_context_hostname; const char * const config_event_context_ip; +const char * const config_event_context_perf_thread_counter; #endif /* CONFIG_SESSION_INTERNAL_H */ diff --git a/src/common/config/config.c b/src/common/config/config.c index cdc044d6d..4d855bf8a 100644 --- a/src/common/config/config.c +++ b/src/common/config/config.c @@ -154,6 +154,7 @@ const char * const config_event_context_vppid = "VPPID"; const char * const config_event_context_pthread_id = "PTHREAD_ID"; const char * const config_event_context_hostname = "HOSTNAME"; const char * const config_event_context_ip = "IP"; +const char * const config_event_context_perf_thread_counter = "PERF_THREAD_COUNTER"; struct consumer_output { int enabled;