Mercurial > hg > truffle
comparison src/share/vm/graal/graalCompiler.hpp @ 16399:4481cf549cfc
removed (Java based) CompilationQueue
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 03 Jul 2014 23:28:35 +0200 |
parents | d32be0297274 |
children | 4a6e24a8fc2c |
comparison
equal
deleted
inserted
replaced
16398:c5ab3fbec257 | 16399:4481cf549cfc |
---|---|
30 | 30 |
31 private: | 31 private: |
32 | 32 |
33 #ifdef COMPILERGRAAL | 33 #ifdef COMPILERGRAAL |
34 bool _bootstrapping; | 34 bool _bootstrapping; |
35 volatile int _compiled; // no synchronization so may not be 100% accurate | |
36 | 35 |
37 void start_compilation_queue(); | 36 /** |
38 void shutdown_compilation_queue(); | 37 * Number of methods compiled by Graal. This is not synchronized |
38 * so may not be 100% accurate. | |
39 */ | |
40 volatile int _methodsCompiled; | |
41 | |
39 #endif | 42 #endif |
40 | 43 |
41 static GraalCompiler* _instance; | 44 static GraalCompiler* _instance; |
42 | 45 |
43 public: | 46 public: |
65 void bootstrap(); | 68 void bootstrap(); |
66 | 69 |
67 // Compilation entry point for methods | 70 // Compilation entry point for methods |
68 virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci); | 71 virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci); |
69 | 72 |
70 void compile_method(methodHandle target, int entry_bci, CompileTask* task, jboolean blocking); | 73 void compile_method(methodHandle target, int entry_bci, CompileTask* task); |
71 | 74 |
72 // Print compilation timers and statistics | 75 // Print compilation timers and statistics |
73 virtual void print_timers(); | 76 virtual void print_timers(); |
74 | 77 |
75 // Print compilation statistics | 78 // Print compilation statistics |
76 void reset_compilation_stats(); | 79 void reset_compilation_stats(); |
77 | |
78 void shutdown(); | |
79 #endif // COMPILERGRAAL | 80 #endif // COMPILERGRAAL |
80 | 81 |
81 #ifndef PRODUCT | 82 #ifndef PRODUCT |
82 void compile_the_world(); | 83 void compile_the_world(); |
83 #endif | 84 #endif |
84 }; | 85 }; |
85 | 86 |
86 #ifdef COMPILERGRAAL | |
87 /** | |
88 * Creates a scope in which scheduling a Graal compilation is disabled. | |
89 * Scheduling a compilation can happen anywhere a counter can overflow and | |
90 * calling back into the Java code for scheduling a compilation (i.e., | |
91 * CompilationTask.compileMetaspaceMethod()) from such arbitrary locations | |
92 * can cause objects to be in an unexpected state. | |
93 * | |
94 * In addition, it can be useful to disable compilation scheduling in | |
95 * other circumstances such as when initializing the Graal compilation | |
96 * queue or when running the Graal bootstrap process. | |
97 */ | |
98 class NoGraalCompilationScheduling: public StackObj { | |
99 private: | |
100 JavaThread* _thread; | |
101 public: | |
102 | |
103 NoGraalCompilationScheduling(JavaThread *thread) { | |
104 assert(thread == JavaThread::current(), "not the current thread"); | |
105 assert(thread->can_schedule_graal_compilation(), "recursive Graal compilation scheduling"); | |
106 _thread = thread; | |
107 thread->set_can_schedule_graal_compilation(false); | |
108 } | |
109 | |
110 ~NoGraalCompilationScheduling() { | |
111 assert(!_thread->can_schedule_graal_compilation(), "unexpected Graal compilation scheduling state"); | |
112 _thread->set_can_schedule_graal_compilation(true); | |
113 } | |
114 }; | |
115 #endif // COMPILERGRAAL | |
116 | |
117 #endif // SHARE_VM_GRAAL_GRAAL_COMPILER_HPP | 87 #endif // SHARE_VM_GRAAL_GRAAL_COMPILER_HPP |