Skip to contentSkip to conversation

Fix: missing context type string in save for ust context

PATCH David Goulet 1 participant 1 message Jun 12, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Merged!

Quoted 61 lines · Jonathan Rajotte Julien

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

---
 src/bin/lttng-sessiond/save.c          | 4 ++++
 src/common/config/config-session-abi.h | 1 +
 src/common/config/config.c             | 1 +
 3 files changed, 6 insertions(+)
src/bin/lttng-sessiond/save.c +4 -0
index 18d303c..8afdbb5 100644
@@ -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;
src/common/config/config-session-abi.h +1 -0
index 3c51883..0efd391 100644
@@ -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 */
src/common/config/config.c +1 -0
index cdc044d..4d855bf 100644
@@ -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;
Signature · 7 lines
2.0.0


_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev