Mercurial > hg > graal-jvmci-8
comparison src/share/vm/graal/graalCompiler.cpp @ 15603:b7fb36e57da8
made Graal initialization be driven from Java to simplify sequencing and synchronization
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 12 May 2014 23:27:07 +0200 |
parents | 063ec2920d21 |
children | 66a9286203a2 |
comparison
equal
deleted
inserted
replaced
15602:c73df62cbaee | 15603:b7fb36e57da8 |
---|---|
46 #ifdef COMPILERGRAAL | 46 #ifdef COMPILERGRAAL |
47 if (!UseCompiler || !should_perform_init()) { | 47 if (!UseCompiler || !should_perform_init()) { |
48 return; | 48 return; |
49 } | 49 } |
50 | 50 |
51 GraalRuntime::initialize(); | |
52 | |
53 BufferBlob* buffer_blob = GraalRuntime::initialize_buffer_blob(); | 51 BufferBlob* buffer_blob = GraalRuntime::initialize_buffer_blob(); |
54 if (!UseGraalCompilationQueue) { | 52 if (!UseGraalCompilationQueue) { |
55 // This path is used for initialization both by the native queue and the graal queue | 53 // This path is used for initialization both by the native queue and the graal queue |
56 // but set_state acquires a lock which might not be safe during JVM_CreateJavaVM, so | 54 // but set_state acquires a lock which might not be safe during JVM_CreateJavaVM, so |
57 // only update the state flag for the native queue. | 55 // only update the state flag for the native queue. |
66 HandleMark hm; | 64 HandleMark hm; |
67 | 65 |
68 bool bootstrap = UseGraalCompilationQueue && (FLAG_IS_DEFAULT(BootstrapGraal) ? !TieredCompilation : BootstrapGraal); | 66 bool bootstrap = UseGraalCompilationQueue && (FLAG_IS_DEFAULT(BootstrapGraal) ? !TieredCompilation : BootstrapGraal); |
69 VMToCompiler::startCompiler(bootstrap); | 67 VMToCompiler::startCompiler(bootstrap); |
70 _started = true; | 68 _started = true; |
69 | |
70 // Graal is considered as application code so we need to | |
71 // stop the VM deferring compilation now. | |
71 CompilationPolicy::completed_vm_startup(); | 72 CompilationPolicy::completed_vm_startup(); |
73 | |
72 if (bootstrap) { | 74 if (bootstrap) { |
73 // Avoid -Xcomp and -Xbatch problems by turning on interpreter and background compilation for bootstrapping. | 75 // Avoid -Xcomp and -Xbatch problems by turning on interpreter and background compilation for bootstrapping. |
74 FlagSetting a(UseInterpreter, true); | 76 FlagSetting a(UseInterpreter, true); |
75 FlagSetting b(BackgroundCompilation, true); | 77 FlagSetting b(BackgroundCompilation, true); |
76 #ifndef PRODUCT | 78 #ifndef PRODUCT |