< prev index next >
src/share/vm/shark/sharkCompiler.cpp
Print this page
rev 7614 : [mq]: shark-build-hotspot.patch
*** 59,69 ****
--- 59,77 ----
SharkCompiler::SharkCompiler()
: AbstractCompiler(shark) {
// Create the lock to protect the memory manager and execution engine
_execution_engine_lock = new Monitor(Mutex::leaf, "SharkExecutionEngineLock");
+ {
MutexLocker locker(execution_engine_lock());
+ init_llvm();
+ }
+ // All done
+ set_state(initialized);
+ }
+
+ void SharkCompiler::init_llvm() {
// Make LLVM safe for multithreading
if (!llvm_start_multithreaded())
fatal("llvm_start_multithreaded() failed");
*** 132,144 ****
printf("Unknown error while creating Shark JIT\n");
exit(1);
}
execution_engine()->addModule(_native_context->module());
-
- // All done
- set_state(initialized);
}
void SharkCompiler::initialize() {
ShouldNotCallThis();
}
--- 140,149 ----
*** 163,173 ****
if (!fnmatch(SharkPrintTypeflowOf, name, 0))
flow->print_on(tty);
}
// Create the recorders
! Arena arena;
env->set_oop_recorder(new OopRecorder(&arena));
OopMapSet oopmaps;
env->set_debug_info(new DebugInformationRecorder(env->oop_recorder()));
env->debug_info()->set_oopmaps(&oopmaps);
env->set_dependencies(new Dependencies(env));
--- 168,178 ----
if (!fnmatch(SharkPrintTypeflowOf, name, 0))
flow->print_on(tty);
}
// Create the recorders
! Arena arena(mtCompiler);
env->set_oop_recorder(new OopRecorder(&arena));
OopMapSet oopmaps;
env->set_debug_info(new DebugInformationRecorder(env->oop_recorder()));
env->debug_info()->set_oopmaps(&oopmaps);
env->set_dependencies(new Dependencies(env));
< prev index next >