[lttng-dev] [PATCH lttng-ust] Rename Java Agent event names to "event"

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Jul 30 22:06:45 EDT 2015


Merged, thanks!

Mathieu

----- On Jul 30, 2015, at 4:11 PM, Alexandre Montplaisir alexmonthy at efficios.com wrote:

> Previously, separate event names were used for events targeting
> a root session daemon or a user one. Those were "sys_event" and
> "user_event", respectively.
> 
> Now that the Java side only sends one event type, we can rename
> it to simply "event".
> 
> This patch is dependant on a similar update on the lttng-tools
> side.
> 
> Signed-off-by: Alexandre Montplaisir <alexmonthy at efficios.com>
> ---
> liblttng-ust-java-agent/jni/jul/lttng_ust_jul.c     | 3 +--
> liblttng-ust-java-agent/jni/jul/lttng_ust_jul.h     | 3 +--
> liblttng-ust-java-agent/jni/log4j/lttng_ust_log4j.c | 3 +--
> liblttng-ust-java-agent/jni/log4j/lttng_ust_log4j.h | 3 +--
> 4 files changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/liblttng-ust-java-agent/jni/jul/lttng_ust_jul.c
> b/liblttng-ust-java-agent/jni/jul/lttng_ust_jul.c
> index 7363f65..0e86fbc 100644
> --- a/liblttng-ust-java-agent/jni/jul/lttng_ust_jul.c
> +++ b/liblttng-ust-java-agent/jni/jul/lttng_ust_jul.c
> @@ -41,8 +41,7 @@ JNIEXPORT void JNICALL
> Java_org_lttng_ust_agent_jul_LttngLogHandler_tracepoint(J
> 	const char *class_name_cstr = (*env)->GetStringUTFChars(env, class_name,
> 	&iscopy);
> 	const char *method_name_cstr = (*env)->GetStringUTFChars(env, method_name,
> 	&iscopy);
> 
> -	// FIXME Change "sys_event" to "event" once lttng-tools is updated
> -	tracepoint(lttng_jul, sys_event, msg_cstr, logger_name_cstr,
> +	tracepoint(lttng_jul, event, msg_cstr, logger_name_cstr,
> 			class_name_cstr, method_name_cstr, millis, log_level, thread_id);
> 
> 	(*env)->ReleaseStringUTFChars(env, msg, msg_cstr);
> diff --git a/liblttng-ust-java-agent/jni/jul/lttng_ust_jul.h
> b/liblttng-ust-java-agent/jni/jul/lttng_ust_jul.h
> index 1482d90..ebbe2c3 100644
> --- a/liblttng-ust-java-agent/jni/jul/lttng_ust_jul.h
> +++ b/liblttng-ust-java-agent/jni/jul/lttng_ust_jul.h
> @@ -27,8 +27,7 @@
> /*
>  * Tracepoint used by Java applications using the JUL handler.
>  */
> -// FIXME Change "sys_event" to "event" once lttng-tools is updated
> -TRACEPOINT_EVENT(lttng_jul, sys_event,
> +TRACEPOINT_EVENT(lttng_jul, event,
> 	TP_ARGS(
> 		const char *, msg,
> 		const char *, logger_name,
> diff --git a/liblttng-ust-java-agent/jni/log4j/lttng_ust_log4j.c
> b/liblttng-ust-java-agent/jni/log4j/lttng_ust_log4j.c
> index d5df70e..73d4eee 100644
> --- a/liblttng-ust-java-agent/jni/log4j/lttng_ust_log4j.c
> +++ b/liblttng-ust-java-agent/jni/log4j/lttng_ust_log4j.c
> @@ -45,8 +45,7 @@ JNIEXPORT void JNICALL
> Java_org_lttng_ust_agent_log4j_LttngLogAppender_tracepoin
> 	const char *file_name_cstr = (*env)->GetStringUTFChars(env, file_name, &iscopy);
> 	const char *thread_name_cstr = (*env)->GetStringUTFChars(env, thread_name,
> 	&iscopy);
> 
> -	// FIXME Change "sys_event" to "event" once lttng-tools is updated
> -	tracepoint(lttng_log4j, sys_event, msg_cstr, logger_name_cstr,
> +	tracepoint(lttng_log4j, event, msg_cstr, logger_name_cstr,
> 		   class_name_cstr, method_name_cstr, file_name_cstr,
> 		   line_number, timestamp, loglevel, thread_name_cstr);
> 
> diff --git a/liblttng-ust-java-agent/jni/log4j/lttng_ust_log4j.h
> b/liblttng-ust-java-agent/jni/log4j/lttng_ust_log4j.h
> index 7e20b69..d9b592d 100644
> --- a/liblttng-ust-java-agent/jni/log4j/lttng_ust_log4j.h
> +++ b/liblttng-ust-java-agent/jni/log4j/lttng_ust_log4j.h
> @@ -27,8 +27,7 @@
> /*
>  * Tracepoint used by Java applications using the log4j log appender.
>  */
> -// FIXME Change "sys_event" to "event" once lttng-tools is updated
> -TRACEPOINT_EVENT(lttng_log4j, sys_event,
> +TRACEPOINT_EVENT(lttng_log4j, event,
> 	TP_ARGS(
> 		const char *, msg,
> 		const char *, logger_name,
> --
> 2.5.0
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list