[lttng-dev] [PATCH lttng-tool] Fix: missing context type string in save for ust context

David Goulet dgoulet at efficios.com
Thu Jun 12 14:03:15 EDT 2014


Merged!

On 09 Jun (15:45:39), Jonathan Rajotte Julien wrote:
> 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 <jonathan.r.julien at gmail.com>
> ---
>  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(+)
> 
> diff --git a/src/bin/lttng-sessiond/save.c b/src/bin/lttng-sessiond/save.c
> index 18d303c..8afdbb5 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 3c51883..0efd391 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 cdc044d..4d855bf 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;
> -- 
> 2.0.0
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: Digital signature
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20140612/79de5b5e/attachment-0001.sig>


More information about the lttng-dev mailing list