comparison src/share/vm/runtime/thread.hpp @ 16795:a29e6e7b7a86

Replace hsail donor threads with hsail tlabs
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Tue, 12 Aug 2014 16:30:17 -0700
parents 4481cf549cfc
children 52b4284cb496
comparison
equal deleted inserted replaced
16794:74c02c90a3f9 16795:a29e6e7b7a86
434 434
435 // Thread-Local Allocation Buffer (TLAB) support 435 // Thread-Local Allocation Buffer (TLAB) support
436 ThreadLocalAllocBuffer& tlab() { return _tlab; } 436 ThreadLocalAllocBuffer& tlab() { return _tlab; }
437 void initialize_tlab() { 437 void initialize_tlab() {
438 if (UseTLAB) { 438 if (UseTLAB) {
439 tlab().initialize(); 439 tlab().initialize(this);
440 } 440 }
441 } 441 }
442 442
443 jlong allocated_bytes() { return _allocated_bytes; } 443 jlong allocated_bytes() { return _allocated_bytes; }
444 void set_allocated_bytes(jlong value) { _allocated_bytes = value; } 444 void set_allocated_bytes(jlong value) { _allocated_bytes = value; }
948 // it can be added into the exception stack trace 948 // it can be added into the exception stack trace
949 jint _gpu_exception_bci; 949 jint _gpu_exception_bci;
950 Method* _gpu_exception_method; 950 Method* _gpu_exception_method;
951 // Record the hsailDeoptimization info so gc oops_do processing can find it 951 // Record the hsailDeoptimization info so gc oops_do processing can find it
952 void* _gpu_hsail_deopt_info; 952 void* _gpu_hsail_deopt_info;
953 jint _gpu_hsail_tlabs_count;
954 ThreadLocalAllocBuffer** _gpu_hsail_tlabs;
953 #endif 955 #endif
954 956
955 public: 957 public:
956 #ifdef GRAAL 958 #ifdef GRAAL
957 void set_gpu_exception_bci(jint bci) { _gpu_exception_bci = bci; } 959 void set_gpu_exception_bci(jint bci) { _gpu_exception_bci = bci; }
958 jint get_gpu_exception_bci() { return _gpu_exception_bci; } 960 jint get_gpu_exception_bci() { return _gpu_exception_bci; }
959 void set_gpu_exception_method(Method* method) { _gpu_exception_method = method; } 961 void set_gpu_exception_method(Method* method) { _gpu_exception_method = method; }
960 Method* get_gpu_exception_method() { return _gpu_exception_method; } 962 Method* get_gpu_exception_method() { return _gpu_exception_method; }
961 void set_gpu_hsail_deopt_info(void * deoptInfo) { _gpu_hsail_deopt_info = deoptInfo; } 963 void set_gpu_hsail_deopt_info(void * deoptInfo) { _gpu_hsail_deopt_info = deoptInfo; }
962 void* get_gpu_hsail_deopt_info() { return _gpu_hsail_deopt_info; } 964 void* get_gpu_hsail_deopt_info() { return _gpu_hsail_deopt_info; }
963 #endif 965 jint get_gpu_hsail_tlabs_count() { return _gpu_hsail_tlabs_count; }
964 966
967 void initialize_gpu_hsail_tlabs(jint count);
968 ThreadLocalAllocBuffer* get_gpu_hsail_tlab_at(jint idx);
969 void gpu_hsail_tlabs_make_parsable(bool retire);
970 void delete_gpu_hsail_tlabs();
971 #endif
972
965 private: 973 private:
974 void tlabs_make_parsable(bool retire);
975
966 // support for JNI critical regions 976 // support for JNI critical regions
967 jint _jni_active_critical; // count of entries into JNI critical region 977 jint _jni_active_critical; // count of entries into JNI critical region
968 978
969 // For deadlock detection. 979 // For deadlock detection.
970 int _depth_first_number; 980 int _depth_first_number;