comparison src/share/vm/runtime/thread.hpp @ 12883:f50418dfb1b7

Merge
author iveresov
date Sun, 13 Oct 2013 13:22:24 -0700
parents 469216acdb28
children 096c224171c4 febc6428bc79 63a4eb8bcd23 2b8e28fdf503
comparison
equal deleted inserted replaced
12844:7c26dced065e 12883:f50418dfb1b7
921 volatile oop _exception_oop; // Exception thrown in compiled code 921 volatile oop _exception_oop; // Exception thrown in compiled code
922 volatile address _exception_pc; // PC where exception happened 922 volatile address _exception_pc; // PC where exception happened
923 volatile address _exception_handler_pc; // PC for handler of exception 923 volatile address _exception_handler_pc; // PC for handler of exception
924 volatile int _is_method_handle_return; // true (== 1) if the current exception PC is a MethodHandle call site. 924 volatile int _is_method_handle_return; // true (== 1) if the current exception PC is a MethodHandle call site.
925 925
926 // support for compilation
927 bool _is_compiling; // is true if a compilation is active inthis thread (one compilation per thread possible)
928
929 // support for JNI critical regions 926 // support for JNI critical regions
930 jint _jni_active_critical; // count of entries into JNI critical region 927 jint _jni_active_critical; // count of entries into JNI critical region
931 928
932 // For deadlock detection. 929 // For deadlock detection.
933 int _depth_first_number; 930 int _depth_first_number;
1002 999
1003 void cleanup_failed_attach_current_thread(); 1000 void cleanup_failed_attach_current_thread();
1004 1001
1005 // Testers 1002 // Testers
1006 virtual bool is_Java_thread() const { return true; } 1003 virtual bool is_Java_thread() const { return true; }
1007
1008 // compilation
1009 void set_is_compiling(bool f) { _is_compiling = f; }
1010 bool is_compiling() const { return _is_compiling; }
1011 1004
1012 // Thread chain operations 1005 // Thread chain operations
1013 JavaThread* next() const { return _next; } 1006 JavaThread* next() const { return _next; }
1014 void set_next(JavaThread* p) { _next = p; } 1007 void set_next(JavaThread* p) { _next = p; }
1015 1008
1280 1273
1281 void set_exception_oop(oop o) { (void)const_cast<oop&>(_exception_oop = o); } 1274 void set_exception_oop(oop o) { (void)const_cast<oop&>(_exception_oop = o); }
1282 void set_exception_pc(address a) { _exception_pc = a; } 1275 void set_exception_pc(address a) { _exception_pc = a; }
1283 void set_exception_handler_pc(address a) { _exception_handler_pc = a; } 1276 void set_exception_handler_pc(address a) { _exception_handler_pc = a; }
1284 void set_is_method_handle_return(bool value) { _is_method_handle_return = value ? 1 : 0; } 1277 void set_is_method_handle_return(bool value) { _is_method_handle_return = value ? 1 : 0; }
1278
1279 void clear_exception_oop_and_pc() {
1280 set_exception_oop(NULL);
1281 set_exception_pc(NULL);
1282 }
1285 1283
1286 // Stack overflow support 1284 // Stack overflow support
1287 inline size_t stack_available(address cur_sp); 1285 inline size_t stack_available(address cur_sp);
1288 address stack_yellow_zone_base() 1286 address stack_yellow_zone_base()
1289 { return (address)(stack_base() - (stack_size() - (stack_red_zone_size() + stack_yellow_zone_size()))); } 1287 { return (address)(stack_base() - (stack_size() - (stack_red_zone_size() + stack_yellow_zone_size()))); }
1809 class CompilerThread : public JavaThread { 1807 class CompilerThread : public JavaThread {
1810 friend class VMStructs; 1808 friend class VMStructs;
1811 private: 1809 private:
1812 CompilerCounters* _counters; 1810 CompilerCounters* _counters;
1813 1811
1814 ciEnv* _env; 1812 ciEnv* _env;
1815 CompileLog* _log; 1813 CompileLog* _log;
1816 CompileTask* _task; 1814 CompileTask* _task;
1817 CompileQueue* _queue; 1815 CompileQueue* _queue;
1818 BufferBlob* _buffer_blob; 1816 BufferBlob* _buffer_blob;
1819 1817
1820 nmethod* _scanned_nmethod; // nmethod being scanned by the sweeper 1818 nmethod* _scanned_nmethod; // nmethod being scanned by the sweeper
1819 AbstractCompiler* _compiler;
1821 1820
1822 public: 1821 public:
1823 1822
1824 static CompilerThread* current(); 1823 static CompilerThread* current();
1825 1824
1827 1826
1828 bool is_Compiler_thread() const { return true; } 1827 bool is_Compiler_thread() const { return true; }
1829 // Hide this compiler thread from external view. 1828 // Hide this compiler thread from external view.
1830 bool is_hidden_from_external_view() const { return true; } 1829 bool is_hidden_from_external_view() const { return true; }
1831 1830
1832 CompileQueue* queue() { return _queue; } 1831 void set_compiler(AbstractCompiler* c) { _compiler = c; }
1833 CompilerCounters* counters() { return _counters; } 1832 AbstractCompiler* compiler() const { return _compiler; }
1833
1834 CompileQueue* queue() const { return _queue; }
1835 CompilerCounters* counters() const { return _counters; }
1834 1836
1835 // Get/set the thread's compilation environment. 1837 // Get/set the thread's compilation environment.
1836 ciEnv* env() { return _env; } 1838 ciEnv* env() { return _env; }
1837 void set_env(ciEnv* env) { _env = env; } 1839 void set_env(ciEnv* env) { _env = env; }
1838 1840
1839 BufferBlob* get_buffer_blob() { return _buffer_blob; } 1841 BufferBlob* get_buffer_blob() const { return _buffer_blob; }
1840 void set_buffer_blob(BufferBlob* b) { _buffer_blob = b; }; 1842 void set_buffer_blob(BufferBlob* b) { _buffer_blob = b; };
1841 1843
1842 // Get/set the thread's logging information 1844 // Get/set the thread's logging information
1843 CompileLog* log() { return _log; } 1845 CompileLog* log() { return _log; }
1844 void init_log(CompileLog* log) { 1846 void init_log(CompileLog* log) {