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




 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();
 361     return mcs == NULL ? 0 : mcs->prev_time();
 362   }




 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   bool init_method_counters(MethodCounters* counters) {
 344     // Try to install a pointer to MethodCounters, return true on success.
 345     return Atomic::cmpxchg_ptr(counters, (volatile void*)&_method_counters, NULL) == NULL;
 346   }
 347 
 348 #ifdef TIERED
 349   // We are reusing interpreter_invocation_count as a holder for the previous event count!
 350   // We can do that since interpreter_invocation_count is not used in tiered.
 351   int prev_event_count() const                   {
 352     if (method_counters() == NULL) {
 353       return 0;
 354     } else {
 355       return method_counters()->interpreter_invocation_count();
 356     }
 357   }
 358   void set_prev_event_count(int count) {
 359     MethodCounters* mcs = method_counters();
 360     if (mcs != NULL) {
 361       mcs->set_interpreter_invocation_count(count);
 362     }
 363   }
 364   jlong prev_time() const                        {
 365     MethodCounters* mcs = method_counters();
 366     return mcs == NULL ? 0 : mcs->prev_time();
 367   }


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