RFR(XXS): 8203346: JFR: Inconsistent signature of jfr_add_string_constant
Aleksey Shipilev
shade at redhat.com
Thu May 17 12:17:11 UTC 2018
On 05/17/2018 01:47 PM, Markus Gronlund wrote:
> Here is an update (with some fixes to a few small things in the vicinity as well):
>
> # HG changeset patch
> # User mgronlun
> # Date 1526557216 -7200
> # Thu May 17 13:40:16 2018 +0200
> # Node ID aa550bc8a5ddd1f0caa6d7e639c04b66b5cb8a2d
> # Parent 8e4fcfb4cfe48e6b481c6aa1751d916014a826af
> 8203346: JFR: Inconsistent signature of jfr_add_string_constant
> Reviewed-by:
>
> diff --git a/src/hotspot/share/jfr/jni/jfrJniMethod.cpp b/src/hotspot/share/jfr/jni/jfrJniMethod.cpp
> --- a/src/hotspot/share/jfr/jni/jfrJniMethod.cpp
> +++ b/src/hotspot/share/jfr/jni/jfrJniMethod.cpp
> @@ -298,11 +298,11 @@
> JVM_END
>
> JVM_ENTRY_NO_ENV(jboolean, jfr_add_string_constant(JNIEnv* env, jclass jvm, jboolean epoch, jlong id, jstring string))
> - return JfrStringPool::add(epoch == JNI_TRUE, id, string, thread);
> + return JfrStringPool::add(epoch == JNI_TRUE, id, string, thread) ? JNI_TRUE : JNI_FALSE;
> JVM_END
>
> JVM_ENTRY_NO_ENV(void, jfr_set_force_instrumentation(JNIEnv* env, jobject jvm, jboolean force_instrumentation))
> - JfrEventClassTransformer::set_force_instrumentation(force_instrumentation == JNI_TRUE ? true : false);
> + JfrEventClassTransformer::set_force_instrumentation(force_instrumentation == JNI_TRUE);
> JVM_END
>
> JVM_ENTRY_NO_ENV(void, jfr_emit_old_object_samples(JNIEnv* env, jobject jvm, jlong cutoff_ticks, jboolean emit_all))
> diff --git a/src/hotspot/share/jfr/jni/jfrJniMethod.hpp b/src/hotspot/share/jfr/jni/jfrJniMethod.hpp
> --- a/src/hotspot/share/jfr/jni/jfrJniMethod.hpp
> +++ b/src/hotspot/share/jfr/jni/jfrJniMethod.hpp
> @@ -117,7 +117,7 @@
>
> jlong JNICALL jfr_get_epoch_address(JNIEnv* env, jobject jvm);
>
> -jlong JNICALL jfr_add_string_constant(JNIEnv* env, jclass jvm, jlong gen, jlong id, jstring string);
> +jboolean JNICALL jfr_add_string_constant(JNIEnv* env, jclass jvm, jboolean epoch, jlong id, jstring string);
>
> void JNICALL jfr_uncaught_exception(JNIEnv* env, jobject jvm, jobject thread, jthrowable throwable);
This looks good.
-Aleksey
More information about the hotspot-dev
mailing list