src/share/vm/oops/method.hpp

Print this page
rev 5729 : 8029396: PPC64 (part 212): Several memory ordering fixes in C-code.


 333   // Finds the first entry point bci of an exception handler for an
 334   // exception of klass ex_klass thrown at throw_bci. A value of NULL
 335   // for ex_klass indicates that the exception klass is not known; in
 336   // this case it matches any constraint class. Returns -1 if the
 337   // exception cannot be handled in this method. The handler
 338   // constraint classes are loaded if necessary. Note that this may
 339   // throw an exception if loading of the constraint classes causes
 340   // an IllegalAccessError (bugid 4307310) or an OutOfMemoryError.
 341   // If an exception is thrown, returns the bci of the
 342   // exception handler which caused the exception to be thrown, which
 343   // is needed for proper retries. See, for example,
 344   // InterpreterRuntime::exception_handler_for_exception.
 345   static int fast_exception_handler_bci_for(methodHandle mh, KlassHandle ex_klass, int throw_bci, TRAPS);
 346 
 347   // method data access
 348   MethodData* method_data() const              {
 349     return _method_data;
 350   }
 351 
 352   void set_method_data(MethodData* data)       {
 353     _method_data = data;



 354   }
 355 
 356   MethodCounters* method_counters() const {
 357     return _method_counters;
 358   }
 359 
 360 
 361   void set_method_counters(MethodCounters* counters) {
 362     _method_counters = counters;



 363   }
 364 
 365 #ifdef TIERED
 366   // We are reusing interpreter_invocation_count as a holder for the previous event count!
 367   // We can do that since interpreter_invocation_count is not used in tiered.
 368   int prev_event_count() const                   {
 369     if (method_counters() == NULL) {
 370       return 0;
 371     } else {
 372       return method_counters()->interpreter_invocation_count();
 373     }
 374   }
 375   void set_prev_event_count(int count, TRAPS)    {
 376     MethodCounters* mcs = get_method_counters(CHECK);
 377     if (mcs != NULL) {
 378       mcs->set_interpreter_invocation_count(count);
 379     }
 380   }
 381   jlong prev_time() const                        {
 382     return method_counters() == NULL ? 0 : method_counters()->prev_time();




 333   // Finds the first entry point bci of an exception handler for an
 334   // exception of klass ex_klass thrown at throw_bci. A value of NULL
 335   // for ex_klass indicates that the exception klass is not known; in
 336   // this case it matches any constraint class. Returns -1 if the
 337   // exception cannot be handled in this method. The handler
 338   // constraint classes are loaded if necessary. Note that this may
 339   // throw an exception if loading of the constraint classes causes
 340   // an IllegalAccessError (bugid 4307310) or an OutOfMemoryError.
 341   // If an exception is thrown, returns the bci of the
 342   // exception handler which caused the exception to be thrown, which
 343   // is needed for proper retries. See, for example,
 344   // InterpreterRuntime::exception_handler_for_exception.
 345   static int fast_exception_handler_bci_for(methodHandle mh, KlassHandle ex_klass, int throw_bci, TRAPS);
 346 
 347   // method data access
 348   MethodData* method_data() const              {
 349     return _method_data;
 350   }
 351 
 352   void set_method_data(MethodData* data)       {
 353     // The store into method must be released. On platforms without
 354     // total store order (TSO) the reference may become visible before
 355     // the initialization of data otherwise.
 356     OrderAccess::release_store_ptr((volatile void *)&_method_data, data);
 357   }
 358 
 359   MethodCounters* method_counters() const {
 360     return _method_counters;
 361   }
 362 

 363   void set_method_counters(MethodCounters* counters) {
 364     // The store into method must be released. On platforms without
 365     // total store order (TSO) the reference may become visible before
 366     // the initialization of data otherwise.
 367     OrderAccess::release_store_ptr((volatile void *)&_method_counters, counters);
 368   }
 369 
 370 #ifdef TIERED
 371   // We are reusing interpreter_invocation_count as a holder for the previous event count!
 372   // We can do that since interpreter_invocation_count is not used in tiered.
 373   int prev_event_count() const                   {
 374     if (method_counters() == NULL) {
 375       return 0;
 376     } else {
 377       return method_counters()->interpreter_invocation_count();
 378     }
 379   }
 380   void set_prev_event_count(int count, TRAPS)    {
 381     MethodCounters* mcs = get_method_counters(CHECK);
 382     if (mcs != NULL) {
 383       mcs->set_interpreter_invocation_count(count);
 384     }
 385   }
 386   jlong prev_time() const                        {
 387     return method_counters() == NULL ? 0 : method_counters()->prev_time();