mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
Merge
This commit is contained in:
commit
3c3e60d5be
58 changed files with 705 additions and 903 deletions
|
@ -29,6 +29,7 @@
|
|||
#include "classfile/classLoaderData.hpp"
|
||||
#include "classfile/stringTable.hpp"
|
||||
#include "code/codeCache.hpp"
|
||||
#include "jvmtifiles/jvmtiEnv.hpp"
|
||||
#include "memory/metadataFactory.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
|
@ -106,6 +107,29 @@ WB_ENTRY(jboolean, WB_IsClassAlive(JNIEnv* env, jobject target, jstring name))
|
|||
return closure.found();
|
||||
WB_END
|
||||
|
||||
WB_ENTRY(void, WB_AddToBootstrapClassLoaderSearch(JNIEnv* env, jobject o, jstring segment)) {
|
||||
#if INCLUDE_JVMTI
|
||||
ResourceMark rm;
|
||||
const char* seg = java_lang_String::as_utf8_string(JNIHandles::resolve_non_null(segment));
|
||||
JvmtiEnv* jvmti_env = JvmtiEnv::create_a_jvmti(JVMTI_VERSION);
|
||||
jvmtiError err = jvmti_env->AddToBootstrapClassLoaderSearch(seg);
|
||||
assert(err == JVMTI_ERROR_NONE, "must not fail");
|
||||
#endif
|
||||
}
|
||||
WB_END
|
||||
|
||||
WB_ENTRY(void, WB_AddToSystemClassLoaderSearch(JNIEnv* env, jobject o, jstring segment)) {
|
||||
#if INCLUDE_JVMTI
|
||||
ResourceMark rm;
|
||||
const char* seg = java_lang_String::as_utf8_string(JNIHandles::resolve_non_null(segment));
|
||||
JvmtiEnv* jvmti_env = JvmtiEnv::create_a_jvmti(JVMTI_VERSION);
|
||||
jvmtiError err = jvmti_env->AddToSystemClassLoaderSearch(seg);
|
||||
assert(err == JVMTI_ERROR_NONE, "must not fail");
|
||||
#endif
|
||||
}
|
||||
WB_END
|
||||
|
||||
|
||||
WB_ENTRY(jlong, WB_GetCompressedOopsMaxHeapSize(JNIEnv* env, jobject o)) {
|
||||
return (jlong)Arguments::max_heap_for_compressed_oops();
|
||||
}
|
||||
|
@ -1095,6 +1119,10 @@ static JNINativeMethod methods[] = {
|
|||
CC"(Ljava/lang/String;[Lsun/hotspot/parser/DiagnosticCommand;)[Ljava/lang/Object;",
|
||||
(void*) &WB_ParseCommandLine
|
||||
},
|
||||
{CC"addToBootstrapClassLoaderSearch", CC"(Ljava/lang/String;)V",
|
||||
(void*)&WB_AddToBootstrapClassLoaderSearch},
|
||||
{CC"addToSystemClassLoaderSearch", CC"(Ljava/lang/String;)V",
|
||||
(void*)&WB_AddToSystemClassLoaderSearch},
|
||||
{CC"getCompressedOopsMaxHeapSize", CC"()J",
|
||||
(void*)&WB_GetCompressedOopsMaxHeapSize},
|
||||
{CC"printHeapSizes", CC"()V", (void*)&WB_PrintHeapSizes },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue