RFR(XXS): 8203346: JFR: Inconsistent signature of jfr_add_string_constant

Aleksey Shipilev shade at redhat.com
Thu May 17 10:52:10 UTC 2018


On 05/17/2018 12:40 PM, Markus Gronlund wrote:
> Please see this tiny fix for the following bug:
> 
> https://bugs.openjdk.java.net/browse/JDK-8203346 
> 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);
> +jlong 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);

Looks good, but see:

$ ack jfr_add_string_constant src/hotspot/

src/hotspot/share/jfr/jni/jfrJniMethod.cpp
300:JVM_ENTRY_NO_ENV(jboolean, jfr_add_string_constant(JNIEnv* env, jclass jvm, jboolean epoch,
jlong id, jstring string))

src/hotspot/share/jfr/jni/jfrJniMethod.hpp
120:jlong JNICALL jfr_add_string_constant(JNIEnv* env, jclass jvm, jlong gen, jlong id, jstring string);

src/hotspot/share/jfr/jni/jfrJniMethodRegistration.cpp
76:      (char*)"addStringConstant", (char*)"(ZJLjava/lang/String;)Z", (void*)jfr_add_string_constant,


In jfrJniMethodRegistration.cpp, the signature should now be "(ZZLjava/lang/String;)Z"


-Aleksey

P.S. You might want to fix your mailer, it produces excess newlines:
 http://mail.openjdk.java.net/pipermail/hotspot-dev/2018-May/032352.html



More information about the hotspot-dev mailing list