changeset 50712:268ea94772da

8203346: JFR: Inconsistent signature of jfr_add_string_constant Reviewed-by: shade
author mgronlun
date Thu, 17 May 2018 14:31:31 +0200
parents f9fe56417050
children 88bf53770be5
files src/hotspot/share/jfr/jni/jfrJniMethod.cpp src/hotspot/share/jfr/jni/jfrJniMethod.hpp
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/jfr/jni/jfrJniMethod.cpp	Thu May 17 14:19:54 2018 +0200
+++ b/src/hotspot/share/jfr/jni/jfrJniMethod.cpp	Thu May 17 14:31:31 2018 +0200
@@ -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))
--- a/src/hotspot/share/jfr/jni/jfrJniMethod.hpp	Thu May 17 14:19:54 2018 +0200
+++ b/src/hotspot/share/jfr/jni/jfrJniMethod.hpp	Thu May 17 14:31:31 2018 +0200
@@ -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);