< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahPacer.inline.hpp

Print this page




  30 inline void ShenandoahPacer::report_mark(size_t words) {
  31   report_internal(words);
  32   report_progress_internal(words);
  33 }
  34 
  35 inline void ShenandoahPacer::report_evac(size_t words) {
  36   report_internal(words);
  37 }
  38 
  39 inline void ShenandoahPacer::report_updaterefs(size_t words) {
  40   report_internal(words);
  41 }
  42 
  43 inline void ShenandoahPacer::report_alloc(size_t words) {
  44   report_internal(words);
  45 }
  46 
  47 inline void ShenandoahPacer::report_internal(size_t words) {
  48   assert(ShenandoahPacing, "Only be here when pacing is enabled");
  49   STATIC_ASSERT(sizeof(size_t) <= sizeof(intptr_t));
  50   Atomic::add((intptr_t)words, &_budget);
  51 }
  52 
  53 inline void ShenandoahPacer::report_progress_internal(size_t words) {
  54   assert(ShenandoahPacing, "Only be here when pacing is enabled");
  55   STATIC_ASSERT(sizeof(size_t) <= sizeof(intptr_t));
  56   Atomic::add((intptr_t)words, &_progress);
  57 }
  58 
  59 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHPACER_INLINE_HPP


  30 inline void ShenandoahPacer::report_mark(size_t words) {
  31   report_internal(words);
  32   report_progress_internal(words);
  33 }
  34 
  35 inline void ShenandoahPacer::report_evac(size_t words) {
  36   report_internal(words);
  37 }
  38 
  39 inline void ShenandoahPacer::report_updaterefs(size_t words) {
  40   report_internal(words);
  41 }
  42 
  43 inline void ShenandoahPacer::report_alloc(size_t words) {
  44   report_internal(words);
  45 }
  46 
  47 inline void ShenandoahPacer::report_internal(size_t words) {
  48   assert(ShenandoahPacing, "Only be here when pacing is enabled");
  49   STATIC_ASSERT(sizeof(size_t) <= sizeof(intptr_t));
  50   Atomic::add(&_budget, (intptr_t)words);
  51 }
  52 
  53 inline void ShenandoahPacer::report_progress_internal(size_t words) {
  54   assert(ShenandoahPacing, "Only be here when pacing is enabled");
  55   STATIC_ASSERT(sizeof(size_t) <= sizeof(intptr_t));
  56   Atomic::add(&_progress, (intptr_t)words);
  57 }
  58 
  59 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHPACER_INLINE_HPP
< prev index next >