Mercurial > hg > graal-jvmci-8
diff src/share/vm/runtime/thread.hpp @ 8151:b8f261ba79c6
Minimize diff to plain HotSpot version.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 07 Mar 2013 21:00:29 +0100 |
parents | 5fc51c1ecdeb |
children | b9a918201d47 |
line wrap: on
line diff
--- a/src/share/vm/runtime/thread.hpp Thu Mar 07 15:17:51 2013 +0100 +++ b/src/share/vm/runtime/thread.hpp Thu Mar 07 21:00:29 2013 +0100 @@ -769,13 +769,10 @@ JavaThread* _next; // The next thread in the Threads list oop _threadObj; // The Java level thread object - // (thomaswue) Necessary for holding a compilation buffer and ci environment. + // (thomaswue) Necessary for holding a compilation buffer. // Moved up from CompilerThread to JavaThread in order to enable code // installation from Java application code. BufferBlob* _buffer_blob; - ciEnv* _env; - bool _is_compiling; - #ifdef ASSERT private: int _java_call_counter; @@ -905,12 +902,7 @@ #ifdef GRAAL address _graal_alternate_call_target; - DebugScopedValue* _debug_scope; #endif -#ifdef HIGH_LEVEL_INTERPRETER - bool _high_level_interpreter_in_vm; -#endif - StackGuardState _stack_guard_state; nmethod* _scanned_nmethod; // nmethod being scanned by the sweeper @@ -923,6 +915,9 @@ volatile address _exception_handler_pc; // PC for handler of exception volatile int _is_method_handle_return; // true (== 1) if the current exception PC is a MethodHandle call site. + // support for compilation + bool _is_compiling; // is true if a compilation is active inthis thread (one compilation per thread possible) + // support for JNI critical regions jint _jni_active_critical; // count of entries into JNI critical region @@ -982,13 +977,7 @@ struct JNINativeInterface_* get_jni_functions() { return (struct JNINativeInterface_ *)_jni_environment.functions; } - - bool is_compiling() const { return _is_compiling; } - void set_compiling(bool b) { _is_compiling = b; } - // Get/set the thread's compilation environment. - ciEnv* env() { return _env; } - void set_env(ciEnv* env) { _env = env; } BufferBlob* get_buffer_blob() { return _buffer_blob; } void set_buffer_blob(BufferBlob* b) { _buffer_blob = b; }; @@ -1018,6 +1007,10 @@ // Testers virtual bool is_Java_thread() const { return true; } + // compilation + void set_is_compiling(bool f) { _is_compiling = f; } + bool is_compiling() const { return _is_compiling; } + // Thread chain operations JavaThread* next() const { return _next; } void set_next(JavaThread* p) { _next = p; } @@ -1283,13 +1276,6 @@ #ifdef GRAAL void set_graal_alternate_call_target(address a) { _graal_alternate_call_target = a; } - - DebugScopedValue* debug_scope() const { return _debug_scope; } - void set_debug_scope(DebugScopedValue* ds) { _debug_scope = ds; } -#endif -#ifdef HIGH_LEVEL_INTERPRETER - bool high_level_interpreter_in_vm() { return _high_level_interpreter_in_vm; } - void set_high_level_interpreter_in_vm(bool value) { _high_level_interpreter_in_vm = value; } #endif // Exception handling for compiled methods @@ -1374,9 +1360,6 @@ #ifdef GRAAL static ByteSize graal_alternate_call_target_offset() { return byte_offset_of(JavaThread, _graal_alternate_call_target); } #endif -#ifdef HIGH_LEVEL_INTERPRETER - static ByteSize high_level_interpreter_in_vm_offset() { return byte_offset_of(JavaThread, _high_level_interpreter_in_vm); } -#endif static ByteSize exception_oop_offset() { return byte_offset_of(JavaThread, _exception_oop ); } static ByteSize exception_pc_offset() { return byte_offset_of(JavaThread, _exception_pc ); } static ByteSize exception_handler_pc_offset() { return byte_offset_of(JavaThread, _exception_handler_pc); } @@ -1832,6 +1815,7 @@ private: CompilerCounters* _counters; + ciEnv* _env; CompileLog* _log; CompileTask* _task; CompileQueue* _queue; @@ -1845,18 +1829,15 @@ bool is_Compiler_thread() const { return true; } // Hide this compiler thread from external view. - // (thomaswue) For Graal, the compiler thread should be visible. - bool is_hidden_from_external_view() const { -#ifdef GRAALVM - return !DebugGraal; -#else - return true; -#endif - } + bool is_hidden_from_external_view() const { return true; } CompileQueue* queue() { return _queue; } CompilerCounters* counters() { return _counters; } + // Get/set the thread's compilation environment. + ciEnv* env() { return _env; } + void set_env(ciEnv* env) { _env = env; } + // Get/set the thread's logging information CompileLog* log() { return _log; } void init_log(CompileLog* log) {