Mercurial > hg > graal-jvmci-8
comparison src/share/vm/graal/graalCompiler.cpp @ 3064:8b0236cbed14
Make sure that the compiler is initialized at startup (and not on the first compiled method).
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 22 Jun 2011 21:51:26 +0200 |
parents | fecdb0a65fb2 |
children | 536528f48708 |
comparison
equal
deleted
inserted
replaced
3062:848dd57066ad | 3064:8b0236cbed14 |
---|---|
39 } | 39 } |
40 | 40 |
41 // Initialization | 41 // Initialization |
42 void GraalCompiler::initialize() { | 42 void GraalCompiler::initialize() { |
43 if (_initialized) return; | 43 if (_initialized) return; |
44 _initialized = true; | |
44 CompilerThread* THREAD = CompilerThread::current(); | 45 CompilerThread* THREAD = CompilerThread::current(); |
45 _initialized = true; | |
46 TRACE_graal_1("GraalCompiler::initialize"); | 46 TRACE_graal_1("GraalCompiler::initialize"); |
47 | 47 |
48 VmIds::initializeObjects(); | 48 VmIds::initializeObjects(); |
49 | 49 |
50 initialize_buffer_blob(); | 50 initialize_buffer_blob(); |
97 } | 97 } |
98 } | 98 } |
99 | 99 |
100 // Compilation entry point for methods | 100 // Compilation entry point for methods |
101 void GraalCompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci) { | 101 void GraalCompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci) { |
102 initialize(); | 102 assert(_initialized, "must already be initialized"); |
103 VM_ENTRY_MARK; | 103 VM_ENTRY_MARK; |
104 ResourceMark rm; | 104 ResourceMark rm; |
105 HandleMark hm; | 105 HandleMark hm; |
106 | 106 |
107 initialize_buffer_blob(); | 107 initialize_buffer_blob(); |