src/share/vm/oops/method.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-comp Sdiff src/share/vm/oops

src/share/vm/oops/method.hpp

Print this page




 317   // InterpreterRuntime::exception_handler_for_exception.
 318   static int fast_exception_handler_bci_for(methodHandle mh, KlassHandle ex_klass, int throw_bci, TRAPS);
 319 
 320   // method data access
 321   MethodData* method_data() const              {
 322     return _method_data;
 323   }
 324 
 325   void set_method_data(MethodData* data)       {
 326     // The store into method must be released. On platforms without
 327     // total store order (TSO) the reference may become visible before
 328     // the initialization of data otherwise.
 329     OrderAccess::release_store_ptr((volatile void *)&_method_data, data);
 330   }
 331 
 332   MethodCounters* method_counters() const {
 333     return _method_counters;
 334   }
 335 
 336   void set_method_counters(MethodCounters* counters) {
 337     // The store into method must be released. On platforms without
 338     // total store order (TSO) the reference may become visible before
 339     // the initialization of data otherwise.
 340     OrderAccess::release_store_ptr((volatile void *)&_method_counters, counters);


 341   }
 342 
 343 #ifdef TIERED
 344   // We are reusing interpreter_invocation_count as a holder for the previous event count!
 345   // We can do that since interpreter_invocation_count is not used in tiered.
 346   int prev_event_count() const                   {
 347     if (method_counters() == NULL) {
 348       return 0;
 349     } else {
 350       return method_counters()->interpreter_invocation_count();
 351     }
 352   }
 353   void set_prev_event_count(int count) {
 354     MethodCounters* mcs = method_counters();
 355     if (mcs != NULL) {
 356       mcs->set_interpreter_invocation_count(count);
 357     }
 358   }
 359   jlong prev_time() const                        {
 360     MethodCounters* mcs = method_counters();




 317   // InterpreterRuntime::exception_handler_for_exception.
 318   static int fast_exception_handler_bci_for(methodHandle mh, KlassHandle ex_klass, int throw_bci, TRAPS);
 319 
 320   // method data access
 321   MethodData* method_data() const              {
 322     return _method_data;
 323   }
 324 
 325   void set_method_data(MethodData* data)       {
 326     // The store into method must be released. On platforms without
 327     // total store order (TSO) the reference may become visible before
 328     // the initialization of data otherwise.
 329     OrderAccess::release_store_ptr((volatile void *)&_method_data, data);
 330   }
 331 
 332   MethodCounters* method_counters() const {
 333     return _method_counters;
 334   }
 335 
 336   void set_method_counters(MethodCounters* counters) {
 337     _method_counters = counters;
 338   }
 339 
 340   bool init_method_counters(MethodCounters* counters) {
 341     // Try to install a pointer to MethodCounters, return true on success.
 342     return Atomic::cmpxchg_ptr(counters, (volatile void*)&_method_counters, NULL) == NULL;
 343   }
 344 
 345 #ifdef TIERED
 346   // We are reusing interpreter_invocation_count as a holder for the previous event count!
 347   // We can do that since interpreter_invocation_count is not used in tiered.
 348   int prev_event_count() const                   {
 349     if (method_counters() == NULL) {
 350       return 0;
 351     } else {
 352       return method_counters()->interpreter_invocation_count();
 353     }
 354   }
 355   void set_prev_event_count(int count) {
 356     MethodCounters* mcs = method_counters();
 357     if (mcs != NULL) {
 358       mcs->set_interpreter_invocation_count(count);
 359     }
 360   }
 361   jlong prev_time() const                        {
 362     MethodCounters* mcs = method_counters();


src/share/vm/oops/method.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File