< prev index next >

src/hotspot/share/runtime/thread.cpp


213 // JavaThread                                                                                                                        
214 
215 
216 Thread::Thread() {                                                                                                                   
217   // stack and get_thread                                                                                                            
218   set_stack_base(NULL);                                                                                                              
219   set_stack_size(0);                                                                                                                 
220   set_self_raw_id(0);                                                                                                                
221   set_lgrp_id(-1);                                                                                                                   
222   DEBUG_ONLY(clear_suspendible_thread();)                                                                                            
223 
224   // allocated data structures                                                                                                       
225   set_osthread(NULL);                                                                                                                
226   set_resource_area(new (mtThread)ResourceArea());                                                                                   
227   DEBUG_ONLY(_current_resource_mark = NULL;)                                                                                         
228   set_handle_area(new (mtThread) HandleArea(NULL));                                                                                  
229   set_metadata_handles(new (ResourceObj::C_HEAP, mtClass) GrowableArray<Metadata*>(30, true));                                       
230   set_active_handles(NULL);                                                                                                          
231   set_free_handle_block(NULL);                                                                                                       
232   set_last_handle_mark(NULL);                                                                                                        
                                                                                                                                     
233 
234   // This initial value ==> never claimed.                                                                                           
235   _oops_do_parity = 0;                                                                                                               
236   _threads_hazard_ptr = NULL;                                                                                                        
237   _threads_list_ptr = NULL;                                                                                                          
238   _nested_threads_hazard_ptr_cnt = 0;                                                                                                
239   _rcu_counter = 0;                                                                                                                  
240 
241   // the handle mark links itself to last_handle_mark                                                                                
242   new HandleMark(this);                                                                                                              
243 
244   // plain initialization                                                                                                            
245   debug_only(_owned_locks = NULL;)                                                                                                   
246   debug_only(_allow_allocation_count = 0;)                                                                                           
247   NOT_PRODUCT(_allow_safepoint_count = 0;)                                                                                           
248   NOT_PRODUCT(_skip_gcalot = false;)                                                                                                 
249   _jvmti_env_iteration_count = 0;                                                                                                    
250   set_allocated_bytes(0);                                                                                                            
251   _vm_operation_started_count = 0;                                                                                                   

213 // JavaThread
214 
215 
216 Thread::Thread() {
217   // stack and get_thread
218   set_stack_base(NULL);
219   set_stack_size(0);
220   set_self_raw_id(0);
221   set_lgrp_id(-1);
222   DEBUG_ONLY(clear_suspendible_thread();)
223 
224   // allocated data structures
225   set_osthread(NULL);
226   set_resource_area(new (mtThread)ResourceArea());
227   DEBUG_ONLY(_current_resource_mark = NULL;)
228   set_handle_area(new (mtThread) HandleArea(NULL));
229   set_metadata_handles(new (ResourceObj::C_HEAP, mtClass) GrowableArray<Metadata*>(30, true));
230   set_active_handles(NULL);
231   set_free_handle_block(NULL);
232   set_last_handle_mark(NULL);
233   DEBUG_ONLY(_missed_ic_stub_refill_mark = NULL);
234 
235   // This initial value ==> never claimed.
236   _oops_do_parity = 0;
237   _threads_hazard_ptr = NULL;
238   _threads_list_ptr = NULL;
239   _nested_threads_hazard_ptr_cnt = 0;
240   _rcu_counter = 0;
241 
242   // the handle mark links itself to last_handle_mark
243   new HandleMark(this);
244 
245   // plain initialization
246   debug_only(_owned_locks = NULL;)
247   debug_only(_allow_allocation_count = 0;)
248   NOT_PRODUCT(_allow_safepoint_count = 0;)
249   NOT_PRODUCT(_skip_gcalot = false;)
250   _jvmti_env_iteration_count = 0;
251   set_allocated_bytes(0);
252   _vm_operation_started_count = 0;
< prev index next >