< prev index next >

src/hotspot/share/opto/library_call.cpp

Print this page

3482   Node* p = basic_plus_adr(top()/*!oop*/, thread, in_bytes(JavaThread::vthread_offset()));
3483   Node* thread_obj_handle
3484     = make_load(NULL, p, p->bottom_type()->is_ptr(), T_OBJECT, MemNode::unordered);
3485   thread_obj_handle = _gvn.transform(thread_obj_handle);
3486   const TypePtr *adr_type = _gvn.type(thread_obj_handle)->isa_ptr();
3487   // Stores of oops to native memory not supported yet by BarrierSetC2::store_at_resolved
3488   // access_store_at(NULL, thread_obj_handle, adr_type, arr, _gvn.type(arr), T_OBJECT, IN_NATIVE | MO_UNORDERED);
3489   store_to_memory(control(), thread_obj_handle, arr, T_OBJECT, adr_type, MemNode::unordered);
3490   JFR_ONLY(extend_setCurrentThread(thread, arr);)
3491   return true;
3492 }
3493 
3494 Node* LibraryCallKit::extentLocalCache_helper() {
3495   ciKlass *objects_klass = ciObjArrayKlass::make(env()->Object_klass());
3496   const TypeOopPtr *etype = TypeOopPtr::make_from_klass(env()->Object_klass());
3497 
3498   bool xk = etype->klass_is_exact();
3499 
3500   Node* thread = _gvn.transform(new ThreadLocalNode());
3501   Node* p = basic_plus_adr(top()/*!oop*/, thread, in_bytes(JavaThread::extentLocalCache_offset()));
3502   return _gvn.transform(LoadNode::make(_gvn, NULL, immutable_memory(), p, p->bottom_type()->is_ptr(),
3503         TypeRawPtr::NOTNULL, T_ADDRESS, MemNode::unordered));




3504 }
3505 
3506 //------------------------inline_native_extentLocalCache------------------
3507 bool LibraryCallKit::inline_native_extentLocalCache() {
3508   ciKlass *objects_klass = ciObjArrayKlass::make(env()->Object_klass());
3509   const TypeOopPtr *etype = TypeOopPtr::make_from_klass(env()->Object_klass());
3510   const TypeAry* arr0 = TypeAry::make(etype, TypeInt::POS);
3511 
3512   // Because we create the extentLocal cache lazily we have to make the
3513   // type of the result BotPTR.
3514   bool xk = etype->klass_is_exact();
3515   const Type* objects_type = TypeAryPtr::make(TypePtr::BotPTR, arr0, objects_klass, xk, 0);
3516   Node* cache_obj_handle = extentLocalCache_helper();
3517   set_result(access_load(cache_obj_handle, objects_type, T_OBJECT, IN_NATIVE));
3518 
3519   return true;
3520 }
3521 
3522 //------------------------inline_native_setExtentLocalCache------------------
3523 bool LibraryCallKit::inline_native_setExtentLocalCache() {

3482   Node* p = basic_plus_adr(top()/*!oop*/, thread, in_bytes(JavaThread::vthread_offset()));
3483   Node* thread_obj_handle
3484     = make_load(NULL, p, p->bottom_type()->is_ptr(), T_OBJECT, MemNode::unordered);
3485   thread_obj_handle = _gvn.transform(thread_obj_handle);
3486   const TypePtr *adr_type = _gvn.type(thread_obj_handle)->isa_ptr();
3487   // Stores of oops to native memory not supported yet by BarrierSetC2::store_at_resolved
3488   // access_store_at(NULL, thread_obj_handle, adr_type, arr, _gvn.type(arr), T_OBJECT, IN_NATIVE | MO_UNORDERED);
3489   store_to_memory(control(), thread_obj_handle, arr, T_OBJECT, adr_type, MemNode::unordered);
3490   JFR_ONLY(extend_setCurrentThread(thread, arr);)
3491   return true;
3492 }
3493 
3494 Node* LibraryCallKit::extentLocalCache_helper() {
3495   ciKlass *objects_klass = ciObjArrayKlass::make(env()->Object_klass());
3496   const TypeOopPtr *etype = TypeOopPtr::make_from_klass(env()->Object_klass());
3497 
3498   bool xk = etype->klass_is_exact();
3499 
3500   Node* thread = _gvn.transform(new ThreadLocalNode());
3501   Node* p = basic_plus_adr(top()/*!oop*/, thread, in_bytes(JavaThread::extentLocalCache_offset()));
3502   // We cannot use immutable_memory() because we might flip onto a
3503   // different carrier thread, at which point we'll need to use that
3504   // carrier thread's cache.
3505   // return _gvn.transform(LoadNode::make(_gvn, NULL, immutable_memory(), p, p->bottom_type()->is_ptr(),
3506   //       TypeRawPtr::NOTNULL, T_ADDRESS, MemNode::unordered));
3507   return make_load(NULL, p, p->bottom_type()->is_ptr(), T_ADDRESS, MemNode::unordered);
3508 }
3509 
3510 //------------------------inline_native_extentLocalCache------------------
3511 bool LibraryCallKit::inline_native_extentLocalCache() {
3512   ciKlass *objects_klass = ciObjArrayKlass::make(env()->Object_klass());
3513   const TypeOopPtr *etype = TypeOopPtr::make_from_klass(env()->Object_klass());
3514   const TypeAry* arr0 = TypeAry::make(etype, TypeInt::POS);
3515 
3516   // Because we create the extentLocal cache lazily we have to make the
3517   // type of the result BotPTR.
3518   bool xk = etype->klass_is_exact();
3519   const Type* objects_type = TypeAryPtr::make(TypePtr::BotPTR, arr0, objects_klass, xk, 0);
3520   Node* cache_obj_handle = extentLocalCache_helper();
3521   set_result(access_load(cache_obj_handle, objects_type, T_OBJECT, IN_NATIVE));
3522 
3523   return true;
3524 }
3525 
3526 //------------------------inline_native_setExtentLocalCache------------------
3527 bool LibraryCallKit::inline_native_setExtentLocalCache() {
< prev index next >