Skip to content
Permalink
Browse files
8252685: APIs that require JavaThread should take JavaThread arguments
Reviewed-by: coleenp, sspitsyn, kvn, iklam
  • Loading branch information
David Holmes committed May 17, 2021
1 parent 2066f49 commit 02f895c5f6f6de38549337d45ed8ba4c446e9677
Showing with 507 additions and 521 deletions.
  1. +0 −1 src/hotspot/cpu/x86/jvmciCodeInstaller_x86.cpp
  2. +7 −7 src/hotspot/cpu/zero/methodHandles_zero.cpp
  3. +1 −1 src/hotspot/cpu/zero/stack_zero.cpp
  4. +2 −2 src/hotspot/cpu/zero/stubGenerator_zero.cpp
  5. +9 −9 src/hotspot/cpu/zero/zeroInterpreter_zero.cpp
  6. +1 −1 src/hotspot/os/aix/os_aix.cpp
  7. +1 −1 src/hotspot/os/bsd/os_bsd.cpp
  8. +1 −1 src/hotspot/os/linux/os_linux.cpp
  9. +1 −1 src/hotspot/os_cpu/windows_aarch64/os_windows_aarch64.cpp
  10. +1 −1 src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp
  11. +11 −11 src/hotspot/share/cds/archiveBuilder.cpp
  12. +2 −2 src/hotspot/share/cds/classListParser.cpp
  13. +1 −1 src/hotspot/share/cds/classListParser.hpp
  14. +4 −4 src/hotspot/share/cds/heapShared.cpp
  15. +4 −4 src/hotspot/share/cds/heapShared.hpp
  16. +5 −5 src/hotspot/share/cds/metaspaceShared.cpp
  17. +2 −2 src/hotspot/share/cds/metaspaceShared.hpp
  18. +4 −4 src/hotspot/share/ci/ciUtilities.inline.hpp
  19. +0 −1 src/hotspot/share/classfile/classFileParser.cpp
  20. +23 −24 src/hotspot/share/classfile/classLoader.cpp
  21. +19 −19 src/hotspot/share/classfile/classLoader.hpp
  22. +1 −2 src/hotspot/share/classfile/classLoaderData.cpp
  23. +9 −8 src/hotspot/share/classfile/classLoaderExt.cpp
  24. +9 −9 src/hotspot/share/classfile/classLoaderExt.hpp
  25. +20 −14 src/hotspot/share/classfile/javaClasses.cpp
  26. +1 −0 src/hotspot/share/classfile/javaClasses.hpp
  27. +1 −3 src/hotspot/share/classfile/klassFactory.cpp
  28. +2 −3 src/hotspot/share/classfile/stringTable.cpp
  29. +3 −3 src/hotspot/share/classfile/symbolTable.cpp
  30. +9 −9 src/hotspot/share/classfile/systemDictionary.cpp
  31. +1 −1 src/hotspot/share/classfile/systemDictionaryShared.cpp
  32. +2 −2 src/hotspot/share/classfile/verifier.cpp
  33. +4 −5 src/hotspot/share/compiler/compilationPolicy.cpp
  34. +1 −1 src/hotspot/share/compiler/compilationPolicy.hpp
  35. +3 −3 src/hotspot/share/compiler/compileBroker.cpp
  36. +3 −3 src/hotspot/share/compiler/compileBroker.hpp
  37. +3 −3 src/hotspot/share/gc/shared/allocTracer.cpp
  38. +3 −3 src/hotspot/share/gc/shared/allocTracer.hpp
  39. +6 −7 src/hotspot/share/gc/shared/memAllocator.cpp
  40. +5 −5 src/hotspot/share/interpreter/interpreterRuntime.cpp
  41. +5 −6 src/hotspot/share/jfr/dcmd/jfrDcmds.cpp
  42. +1 −1 src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
  43. +4 −4 src/hotspot/share/jfr/instrumentation/jfrJvmtiAgent.cpp
  44. +22 −22 src/hotspot/share/jfr/jni/jfrJavaSupport.cpp
  45. +14 −14 src/hotspot/share/jfr/jni/jfrJavaSupport.hpp
  46. +1 −1 src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleCheckpoint.cpp
  47. +1 −1 src/hotspot/share/jfr/periodic/jfrThreadDumpEvent.cpp
  48. +4 −4 src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp
  49. +2 −2 src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.hpp
  50. +2 −2 src/hotspot/share/jfr/recorder/checkpoint/jfrMetadataEvent.cpp
  51. +4 −5 src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadState.cpp
  52. +4 −4 src/hotspot/share/jfr/recorder/jfrRecorder.cpp
  53. +1 −1 src/hotspot/share/jfr/recorder/jfrRecorder.hpp
  54. +2 −2 src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.cpp
  55. +1 −1 src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp
  56. +2 −2 src/hotspot/share/jfr/recorder/service/jfrOptionSet.hpp
  57. +1 −1 src/hotspot/share/jfr/recorder/service/jfrPostBox.hpp
  58. +3 −3 src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp
  59. +1 −1 src/hotspot/share/jfr/recorder/service/jfrRecorderThread.cpp
  60. +2 −2 src/hotspot/share/jfr/recorder/service/jfrRecorderThreadLoop.cpp
  61. +2 −2 src/hotspot/share/jfr/support/jfrAllocationTracer.cpp
  62. +1 −1 src/hotspot/share/jfr/support/jfrAllocationTracer.hpp
  63. +2 −2 src/hotspot/share/jfr/support/jfrJdkJfrEvent.cpp
  64. +1 −1 src/hotspot/share/jfr/utilities/jfrJavaLog.cpp
  65. +3 −3 src/hotspot/share/jfr/writers/jfrJavaEventWriter.cpp
  66. +2 −2 src/hotspot/share/jfr/writers/jfrJavaEventWriter.hpp
  67. +1 −1 src/hotspot/share/jvmci/jvmciCodeInstaller.cpp
  68. +1 −2 src/hotspot/share/jvmci/jvmciCompiler.cpp
  69. +1 −1 src/hotspot/share/jvmci/jvmciCompilerToVM.cpp
  70. +1 −1 src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp
  71. +36 −36 src/hotspot/share/jvmci/jvmciEnv.cpp
  72. +2 −2 src/hotspot/share/jvmci/jvmciEnv.hpp
  73. +3 −4 src/hotspot/share/jvmci/jvmciJavaClasses.cpp
  74. +4 −4 src/hotspot/share/jvmci/jvmciRuntime.cpp
  75. +2 −1 src/hotspot/share/memory/allocation.hpp
  76. +0 −2 src/hotspot/share/memory/metaspace.cpp
  77. +3 −3 src/hotspot/share/memory/universe.cpp
  78. +8 −8 src/hotspot/share/oops/constantPool.cpp
  79. +1 −0 src/hotspot/share/oops/constantPool.hpp
  80. +4 −4 src/hotspot/share/oops/cpCache.cpp
  81. +4 −2 src/hotspot/share/oops/generateOopMap.cpp
  82. +15 −16 src/hotspot/share/oops/instanceKlass.cpp
  83. +1 −1 src/hotspot/share/oops/method.cpp
  84. +1 −1 src/hotspot/share/oops/method.hpp
  85. +1 −1 src/hotspot/share/oops/objArrayKlass.cpp
  86. +3 −3 src/hotspot/share/oops/oop.cpp
  87. +2 −2 src/hotspot/share/oops/typeArrayKlass.cpp
  88. +2 −2 src/hotspot/share/prims/foreign_globals.cpp
  89. +2 −2 src/hotspot/share/prims/jni.cpp
  90. +2 −2 src/hotspot/share/prims/jvm.cpp
  91. +9 −9 src/hotspot/share/prims/jvmtiEnv.cpp
  92. +1 −1 src/hotspot/share/prims/jvmtiExport.cpp
  93. +2 −2 src/hotspot/share/prims/jvmtiRedefineClasses.cpp
  94. +3 −3 src/hotspot/share/prims/methodComparator.cpp
  95. +3 −3 src/hotspot/share/prims/stackwalk.cpp
  96. +2 −2 src/hotspot/share/prims/universalUpcallHandler.cpp
  97. +0 −1 src/hotspot/share/prims/wbtestmethods/parserTests.cpp
  98. +1 −2 src/hotspot/share/prims/whitebox.cpp
  99. +1 −1 src/hotspot/share/prims/whitebox.hpp
  100. +3 −3 src/hotspot/share/runtime/deoptimization.cpp
  101. +5 −5 src/hotspot/share/runtime/interfaceSupport.inline.hpp
  102. +1 −1 src/hotspot/share/runtime/java.cpp
  103. +5 −6 src/hotspot/share/runtime/javaCalls.cpp
  104. +4 −4 src/hotspot/share/runtime/objectMonitor.cpp
  105. +2 −2 src/hotspot/share/runtime/os.hpp
  106. +2 −6 src/hotspot/share/runtime/reflection.cpp
  107. +1 −1 src/hotspot/share/runtime/relocator.cpp
  108. +1 −1 src/hotspot/share/runtime/safepoint.cpp
  109. +7 −7 src/hotspot/share/runtime/sharedRuntime.cpp
  110. +4 −4 src/hotspot/share/runtime/synchronizer.cpp
  111. +1 −1 src/hotspot/share/runtime/thread.cpp
  112. +5 −5 src/hotspot/share/runtime/vframe.cpp
  113. +4 −4 src/hotspot/share/runtime/vframeArray.cpp
  114. +1 −1 src/hotspot/share/runtime/vmThread.cpp
  115. +3 −3 src/hotspot/share/services/attachListener.cpp
  116. +1 −1 src/hotspot/share/services/diagnosticCommand.cpp
  117. +2 −2 src/hotspot/share/services/diagnosticFramework.cpp
  118. +32 −35 src/hotspot/share/utilities/exceptions.cpp
  119. +26 −26 src/hotspot/share/utilities/exceptions.hpp
  120. +2 −2 test/hotspot/gtest/utilities/test_metaspaceClosure.cpp
@@ -69,7 +69,6 @@ jint CodeInstaller::pd_next_offset(NativeInstruction* inst, jint pc_offset, JVMC
void CodeInstaller::pd_patch_OopConstant(int pc_offset, JVMCIObject constant, JVMCI_TRAPS) {
address pc = _instructions->start() + pc_offset;
Handle obj = jvmci_env()->asConstant(constant, JVMCI_CHECK);
Thread* THREAD = Thread::current();
jobject value = JNIHandles::make_local(obj());
if (jvmci_env()->get_HotSpotObjectConstantImpl_compressed(constant)) {
#ifdef _LP64
@@ -40,7 +40,7 @@

void MethodHandles::invoke_target(Method* method, TRAPS) {

JavaThread *thread = THREAD->as_Java_thread();
JavaThread *thread = THREAD;
ZeroStack *stack = thread->zero_stack();
InterpreterFrame *frame = thread->top_zero_frame()->as_interpreter_frame();
interpreterState istate = frame->interpreter_state();
@@ -57,7 +57,7 @@ void MethodHandles::invoke_target(Method* method, TRAPS) {

oop MethodHandles::popFromStack(TRAPS) {

JavaThread *thread = THREAD->as_Java_thread();
JavaThread *thread = THREAD;
InterpreterFrame *frame = thread->top_zero_frame()->as_interpreter_frame();
interpreterState istate = frame->interpreter_state();
intptr_t* topOfStack = istate->stack();
@@ -93,7 +93,7 @@ void MethodHandles::teardown_frame_anchor(JavaThread* thread) {
}

void MethodHandles::throw_AME(Klass* rcvr, Method* interface_method, TRAPS) {
JavaThread* thread = THREAD->as_Java_thread();
JavaThread* thread = THREAD;
bool has_last_Java_frame = thread->has_last_Java_frame();
if (!has_last_Java_frame) {
setup_frame_anchor(thread);
@@ -105,7 +105,7 @@ void MethodHandles::throw_AME(Klass* rcvr, Method* interface_method, TRAPS) {
}

void MethodHandles::throw_NPE(TRAPS) {
JavaThread* thread = THREAD->as_Java_thread();
JavaThread* thread = THREAD;
bool has_last_Java_frame = thread->has_last_Java_frame();
if (!has_last_Java_frame) {
setup_frame_anchor(thread);
@@ -118,7 +118,7 @@ void MethodHandles::throw_NPE(TRAPS) {

int MethodHandles::method_handle_entry_invokeBasic(Method* method, intptr_t UNUSED, TRAPS) {

JavaThread *thread = THREAD->as_Java_thread();
JavaThread *thread = THREAD;
InterpreterFrame *frame = thread->top_zero_frame()->as_interpreter_frame();
interpreterState istate = frame->interpreter_state();
intptr_t* topOfStack = istate->stack();
@@ -156,7 +156,7 @@ int MethodHandles::method_handle_entry_linkToStaticOrSpecial(Method* method, int
}

int MethodHandles::method_handle_entry_linkToInterface(Method* method, intptr_t UNUSED, TRAPS) {
JavaThread *thread = THREAD->as_Java_thread();
JavaThread *thread = THREAD;
InterpreterFrame *frame = thread->top_zero_frame()->as_interpreter_frame();
interpreterState istate = frame->interpreter_state();

@@ -200,7 +200,7 @@ int MethodHandles::method_handle_entry_linkToInterface(Method* method, intptr_t
}

int MethodHandles::method_handle_entry_linkToVirtual(Method* method, intptr_t UNUSED, TRAPS) {
JavaThread *thread = THREAD->as_Java_thread();
JavaThread *thread = THREAD;

InterpreterFrame *frame = thread->top_zero_frame()->as_interpreter_frame();
interpreterState istate = frame->interpreter_state();
@@ -46,7 +46,7 @@ int ZeroStack::suggest_size(Thread *thread) const {
}

void ZeroStack::handle_overflow(TRAPS) {
JavaThread *thread = THREAD->as_Java_thread();
JavaThread *thread = THREAD;

// Set up the frame anchor if it isn't already
bool has_last_Java_frame = thread->has_last_Java_frame();
@@ -72,7 +72,7 @@ class StubGenerator: public StubCodeGenerator {
intptr_t* parameters,
int parameter_words,
TRAPS) {
JavaThread *thread = THREAD->as_Java_thread();
JavaThread *thread = THREAD;
ZeroStack *stack = thread->zero_stack();

// Make sure we have no pending exceptions
@@ -316,7 +316,7 @@ EntryFrame *EntryFrame::build(const intptr_t* parameters,
JavaCallWrapper* call_wrapper,
TRAPS) {

ZeroStack *stack = THREAD->as_Java_thread()->zero_stack();
ZeroStack *stack = THREAD->zero_stack();
stack->overflow_check(header_words + parameter_words, CHECK_NULL);

stack->push(0); // next_frame, filled in later
@@ -108,7 +108,7 @@ InterpreterCodelet* ZeroInterpreter::codelet_containing(address pc) {
fixup_after_potential_safepoint()

int ZeroInterpreter::normal_entry(Method* method, intptr_t UNUSED, TRAPS) {
JavaThread *thread = THREAD->as_Java_thread();
JavaThread *thread = THREAD;

// Allocate and initialize our frame.
InterpreterFrame *frame = InterpreterFrame::build(method, CHECK_0);
@@ -122,7 +122,7 @@ int ZeroInterpreter::normal_entry(Method* method, intptr_t UNUSED, TRAPS) {
}

int ZeroInterpreter::Reference_get_entry(Method* method, intptr_t UNUSED, TRAPS) {
JavaThread* thread = THREAD->as_Java_thread();
JavaThread* thread = THREAD;
ZeroStack* stack = thread->zero_stack();
intptr_t* topOfStack = stack->sp();

@@ -170,7 +170,7 @@ intptr_t narrow(BasicType type, intptr_t result) {


void ZeroInterpreter::main_loop(int recurse, TRAPS) {
JavaThread *thread = THREAD->as_Java_thread();
JavaThread *thread = THREAD;
ZeroStack *stack = thread->zero_stack();

// If we are entering from a deopt we may need to call
@@ -304,7 +304,7 @@ int ZeroInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) {
// Make sure method is native and not abstract
assert(method->is_native() && !method->is_abstract(), "should be");

JavaThread *thread = THREAD->as_Java_thread();
JavaThread *thread = THREAD;
ZeroStack *stack = thread->zero_stack();

// Allocate and initialize our frame
@@ -551,7 +551,7 @@ int ZeroInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) {
}

int ZeroInterpreter::getter_entry(Method* method, intptr_t UNUSED, TRAPS) {
JavaThread* thread = THREAD->as_Java_thread();
JavaThread* thread = THREAD;
// Drop into the slow path if we need a safepoint check
if (SafepointMechanism::should_process(thread)) {
return normal_entry(method, 0, THREAD);
@@ -639,7 +639,7 @@ int ZeroInterpreter::getter_entry(Method* method, intptr_t UNUSED, TRAPS) {
}

int ZeroInterpreter::setter_entry(Method* method, intptr_t UNUSED, TRAPS) {
JavaThread* thread = THREAD->as_Java_thread();
JavaThread* thread = THREAD;
// Drop into the slow path if we need a safepoint check
if (SafepointMechanism::should_process(thread)) {
return normal_entry(method, 0, THREAD);
@@ -730,7 +730,7 @@ int ZeroInterpreter::setter_entry(Method* method, intptr_t UNUSED, TRAPS) {
}

int ZeroInterpreter::empty_entry(Method* method, intptr_t UNUSED, TRAPS) {
JavaThread *thread = THREAD->as_Java_thread();
JavaThread *thread = THREAD;
ZeroStack *stack = thread->zero_stack();

// Drop into the slow path if we need a safepoint check
@@ -746,7 +746,7 @@ int ZeroInterpreter::empty_entry(Method* method, intptr_t UNUSED, TRAPS) {
}

InterpreterFrame *InterpreterFrame::build(Method* const method, TRAPS) {
JavaThread *thread = THREAD->as_Java_thread();
JavaThread *thread = THREAD;
ZeroStack *stack = thread->zero_stack();

// Calculate the size of the frame we'll build, including
@@ -821,7 +821,7 @@ InterpreterFrame *InterpreterFrame::build(Method* const method, TRAPS) {
}

InterpreterFrame *InterpreterFrame::build(int size, TRAPS) {
ZeroStack *stack = THREAD->as_Java_thread()->zero_stack();
ZeroStack *stack = THREAD->zero_stack();

int size_in_words = size >> LogBytesPerWord;
assert(size_in_words * wordSize == size, "unaligned");
@@ -2542,7 +2542,7 @@ bool os::find(address addr, outputStream* st) {
// on, e.g., Win32.
void
os::os_exception_wrapper(java_call_t f, JavaValue* value, const methodHandle& method,
JavaCallArguments* args, Thread* thread) {
JavaCallArguments* args, JavaThread* thread) {
f(value, method, args, thread);
}

@@ -2221,7 +2221,7 @@ bool os::find(address addr, outputStream* st) {
// on, e.g., Win32.
void os::os_exception_wrapper(java_call_t f, JavaValue* value,
const methodHandle& method, JavaCallArguments* args,
Thread* thread) {
JavaThread* thread) {
f(value, method, args, thread);
}

@@ -4764,7 +4764,7 @@ bool os::find(address addr, outputStream* st) {
// on, e.g., Win32.
void
os::os_exception_wrapper(java_call_t f, JavaValue* value, const methodHandle& method,
JavaCallArguments* args, Thread* thread) {
JavaCallArguments* args, JavaThread* thread) {
f(value, method, args, thread);
}

@@ -59,7 +59,7 @@
# include <stdio.h>
# include <intrin.h>

void os::os_exception_wrapper(java_call_t f, JavaValue* value, const methodHandle& method, JavaCallArguments* args, Thread* thread) {
void os::os_exception_wrapper(java_call_t f, JavaValue* value, const methodHandle& method, JavaCallArguments* args, JavaThread* thread) {
f(value, method, args, thread);
}

@@ -70,7 +70,7 @@ JNIEXPORT
extern LONG WINAPI topLevelExceptionFilter(_EXCEPTION_POINTERS* );

// Install a win32 structured exception handler around thread.
void os::os_exception_wrapper(java_call_t f, JavaValue* value, const methodHandle& method, JavaCallArguments* args, Thread* thread) {
void os::os_exception_wrapper(java_call_t f, JavaValue* value, const methodHandle& method, JavaCallArguments* args, JavaThread* thread) {
__try {

#ifndef AMD64
@@ -900,13 +900,13 @@ class ArchiveBuilder::CDSMapLogger : AllStatic {

#define _LOG_PREFIX PTR_FORMAT ": @@ %-17s %d"

static void write_klass(Klass* k, address runtime_dest, const char* type_name, int bytes, Thread* THREAD) {
ResourceMark rm(THREAD);
static void write_klass(Klass* k, address runtime_dest, const char* type_name, int bytes, Thread* current) {
ResourceMark rm(current);
log_debug(cds, map)(_LOG_PREFIX " %s",
p2i(runtime_dest), type_name, bytes, k->external_name());
}
static void write_method(Method* m, address runtime_dest, const char* type_name, int bytes, Thread* THREAD) {
ResourceMark rm(THREAD);
static void write_method(Method* m, address runtime_dest, const char* type_name, int bytes, Thread* current) {
ResourceMark rm(current);
log_debug(cds, map)(_LOG_PREFIX " %s",
p2i(runtime_dest), type_name, bytes, m->external_name());
}
@@ -916,7 +916,7 @@ class ArchiveBuilder::CDSMapLogger : AllStatic {
address last_obj_base = address(region->base());
address last_obj_end = address(region->base());
address region_end = address(region->end());
Thread* THREAD = Thread::current();
Thread* current = Thread::current();
for (int i = 0; i < src_objs->objs()->length(); i++) {
SourceObjInfo* src_info = src_objs->at(i);
address src = src_info->orig_obj();
@@ -930,25 +930,25 @@ class ArchiveBuilder::CDSMapLogger : AllStatic {

switch (type) {
case MetaspaceObj::ClassType:
write_klass((Klass*)src, runtime_dest, type_name, bytes, THREAD);
write_klass((Klass*)src, runtime_dest, type_name, bytes, current);
break;
case MetaspaceObj::ConstantPoolType:
write_klass(((ConstantPool*)src)->pool_holder(),
runtime_dest, type_name, bytes, THREAD);
runtime_dest, type_name, bytes, current);
break;
case MetaspaceObj::ConstantPoolCacheType:
write_klass(((ConstantPoolCache*)src)->constant_pool()->pool_holder(),
runtime_dest, type_name, bytes, THREAD);
runtime_dest, type_name, bytes, current);
break;
case MetaspaceObj::MethodType:
write_method((Method*)src, runtime_dest, type_name, bytes, THREAD);
write_method((Method*)src, runtime_dest, type_name, bytes, current);
break;
case MetaspaceObj::ConstMethodType:
write_method(((ConstMethod*)src)->method(), runtime_dest, type_name, bytes, THREAD);
write_method(((ConstMethod*)src)->method(), runtime_dest, type_name, bytes, current);
break;
case MetaspaceObj::SymbolType:
{
ResourceMark rm(THREAD);
ResourceMark rm(current);
Symbol* s = (Symbol*)src;
log_debug(cds, map)(_LOG_PREFIX " %s", p2i(runtime_dest), type_name, bytes,
s->as_quoted_ascii());
@@ -522,9 +522,9 @@ bool ClassListParser::is_matching_cp_entry(constantPoolHandle &pool, int cp_inde
return true;
}

void ClassListParser::resolve_indy(Thread* current, Symbol* class_name_symbol) {
void ClassListParser::resolve_indy(JavaThread* current, Symbol* class_name_symbol) {
ExceptionMark em(current);
Thread* THREAD = current; // For exception macros.
JavaThread* THREAD = current; // For exception macros.
ClassListParser::resolve_indy_impl(class_name_symbol, THREAD);
if (HAS_PENDING_EXCEPTION) {
ResourceMark rm(current);
@@ -116,7 +116,7 @@ class ClassListParser : public StackObj {
void print_actual_interfaces(InstanceKlass *ik);
bool is_matching_cp_entry(constantPoolHandle &pool, int cp_index, TRAPS);

void resolve_indy(Thread* current, Symbol* class_name_symbol);
void resolve_indy(JavaThread* current, Symbol* class_name_symbol);
void resolve_indy_impl(Symbol* class_name_symbol, TRAPS);
bool parse_one_line();
Klass* load_current_class(Symbol* class_name_symbol, TRAPS);
@@ -685,7 +685,7 @@ static void verify_the_heap(Klass* k, const char* which) {
// Note: if a ArchivedKlassSubGraphInfoRecord contains non-early classes, and JVMTI
// ClassFileLoadHook is enabled, it's possible for this class to be dynamically replaced. In
// this case, we will not load the ArchivedKlassSubGraphInfoRecord and will clear its roots.
void HeapShared::resolve_classes(Thread* THREAD) {
void HeapShared::resolve_classes(JavaThread* THREAD) {
if (!is_mapped()) {
return; // nothing to do
}
@@ -701,7 +701,7 @@ void HeapShared::resolve_classes(Thread* THREAD) {
}

void HeapShared::resolve_classes_for_subgraphs(ArchivableStaticFieldInfo fields[],
int num, Thread* THREAD) {
int num, JavaThread* THREAD) {
for (int i = 0; i < num; i++) {
ArchivableStaticFieldInfo* info = &fields[i];
TempNewSymbol klass_name = SymbolTable::new_symbol(info->klass_name);
@@ -711,7 +711,7 @@ void HeapShared::resolve_classes_for_subgraphs(ArchivableStaticFieldInfo fields[
}
}

void HeapShared::resolve_classes_for_subgraph_of(Klass* k, Thread* THREAD) {
void HeapShared::resolve_classes_for_subgraph_of(Klass* k, JavaThread* THREAD) {
ExceptionMark em(THREAD);
const ArchivedKlassSubGraphInfoRecord* record =
resolve_or_init_classes_for_subgraph_of(k, /*do_init=*/false, THREAD);
@@ -723,7 +723,7 @@ void HeapShared::resolve_classes_for_subgraph_of(Klass* k, Thread* THREAD) {
}
}

void HeapShared::initialize_from_archived_subgraph(Klass* k, Thread* THREAD) {
void HeapShared::initialize_from_archived_subgraph(Klass* k, JavaThread* THREAD) {
if (!is_mapped()) {
return; // nothing to do
}
@@ -275,8 +275,8 @@ class HeapShared: AllStatic {
static void copy_roots();

static void resolve_classes_for_subgraphs(ArchivableStaticFieldInfo fields[],
int num, Thread* THREAD);
static void resolve_classes_for_subgraph_of(Klass* k, Thread* THREAD);
int num, JavaThread* THREAD);
static void resolve_classes_for_subgraph_of(Klass* k, JavaThread* THREAD);
static void clear_archived_roots_of(Klass* k);
static const ArchivedKlassSubGraphInfoRecord*
resolve_or_init_classes_for_subgraph_of(Klass* k, bool do_init, TRAPS);
@@ -386,8 +386,8 @@ class HeapShared: AllStatic {

inline static bool is_archived_object(oop p) NOT_CDS_JAVA_HEAP_RETURN_(false);

static void resolve_classes(Thread* THREAD) NOT_CDS_JAVA_HEAP_RETURN;
static void initialize_from_archived_subgraph(Klass* k, Thread* THREAD) NOT_CDS_JAVA_HEAP_RETURN;
static void resolve_classes(JavaThread* THREAD) NOT_CDS_JAVA_HEAP_RETURN;
static void initialize_from_archived_subgraph(Klass* k, JavaThread* THREAD) NOT_CDS_JAVA_HEAP_RETURN;

// NarrowOops stored in the CDS archive may use a different encoding scheme
// than CompressedOops::{base,shift} -- see FileMapInfo::map_heap_regions_impl.

0 comments on commit 02f895c

Please sign in to comment.