< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahPacer.cpp

Print this page

        

*** 176,200 **** } size_t ShenandoahPacer::update_and_get_progress_history() { if (_progress == -1) { // First initialization, report some prior ! Atomic::store((intptr_t)PACING_PROGRESS_ZERO, &_progress); return (size_t) (_heap->max_capacity() * 0.1); } else { // Record history, and reply historical data _progress_history->add(_progress); ! Atomic::store((intptr_t)PACING_PROGRESS_ZERO, &_progress); return (size_t) (_progress_history->avg() * HeapWordSize); } } void ShenandoahPacer::restart_with(size_t non_taxable_bytes, double tax_rate) { size_t initial = (size_t)(non_taxable_bytes * tax_rate) >> LogHeapWordSize; STATIC_ASSERT(sizeof(size_t) <= sizeof(intptr_t)); Atomic::xchg((intptr_t)initial, &_budget); ! Atomic::store(tax_rate, &_tax_rate); Atomic::inc(&_epoch); } bool ShenandoahPacer::claim_for_alloc(size_t words, bool force) { assert(ShenandoahPacing, "Only be here when pacing is enabled"); --- 176,200 ---- } size_t ShenandoahPacer::update_and_get_progress_history() { if (_progress == -1) { // First initialization, report some prior ! Atomic::store(&_progress, (intptr_t)PACING_PROGRESS_ZERO); return (size_t) (_heap->max_capacity() * 0.1); } else { // Record history, and reply historical data _progress_history->add(_progress); ! Atomic::store(&_progress, (intptr_t)PACING_PROGRESS_ZERO); return (size_t) (_progress_history->avg() * HeapWordSize); } } void ShenandoahPacer::restart_with(size_t non_taxable_bytes, double tax_rate) { size_t initial = (size_t)(non_taxable_bytes * tax_rate) >> LogHeapWordSize; STATIC_ASSERT(sizeof(size_t) <= sizeof(intptr_t)); Atomic::xchg((intptr_t)initial, &_budget); ! Atomic::store(&_tax_rate, tax_rate); Atomic::inc(&_epoch); } bool ShenandoahPacer::claim_for_alloc(size_t words, bool force) { assert(ShenandoahPacing, "Only be here when pacing is enabled");
< prev index next >