mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-08 03:27:04 +09:00
gc spin tweak
This commit is contained in:
parent
b946f457f6
commit
c02e083cfd
3 changed files with 6 additions and 8 deletions
|
@ -197,12 +197,12 @@ void SatoriRecycler::HelperThreadFn(void* param)
|
|||
goto released;
|
||||
}
|
||||
|
||||
// TODO: VS revisit the value of spinning
|
||||
if (recycler->maySpinAtGate)
|
||||
{
|
||||
// spin for ~10 microseconds
|
||||
// spin for ~10 microseconds (GcSpin)
|
||||
int64_t limit = GCToOSInterface::QueryPerformanceCounter() +
|
||||
recycler->m_perfCounterTicksPerMicro * SatoriUtil::GcSpin();
|
||||
|
||||
int i = 0;
|
||||
do
|
||||
{
|
||||
|
@ -702,6 +702,7 @@ void SatoriRecycler::BlockingMarkForConcurrent()
|
|||
|
||||
// signal to everybody to start marking roots
|
||||
VolatileStore((int*)&m_ccStackMarkState, CC_MARK_STATE_MARKING);
|
||||
m_helperGate->WakeAll();
|
||||
|
||||
// mark demoted regions if any attached to thread contexts
|
||||
MarkContext c(this);
|
||||
|
@ -3623,7 +3624,6 @@ void SatoriRecycler::Update()
|
|||
IncrementCardScanTicket();
|
||||
}
|
||||
|
||||
// TODO: VS revisit value of WakeAll()
|
||||
m_helperGate->WakeAll();
|
||||
}
|
||||
|
||||
|
@ -3843,7 +3843,7 @@ void SatoriRecycler::UpdateRegions(SatoriRegionQueue* queue)
|
|||
{
|
||||
curRegion->MakeBlank();
|
||||
// TODO: VS use ReturnRegionNoLock in more places? (or less?)
|
||||
// what about work chunk queue, can that be lock-free?
|
||||
// what about work chunk queue? that be lock-free.
|
||||
m_heap->Allocator()->ReturnRegionNoLock(curRegion);
|
||||
}
|
||||
|
||||
|
|
|
@ -126,9 +126,6 @@ public:
|
|||
&m_lastEphemeralGcInfo;
|
||||
};
|
||||
|
||||
// TODO: VS needs to be public?
|
||||
bool IsBlockingPhase();
|
||||
|
||||
private:
|
||||
SatoriHeap* m_heap;
|
||||
|
||||
|
@ -308,6 +305,7 @@ private:
|
|||
void BlockingCollect1();
|
||||
void BlockingCollect2();
|
||||
void BlockingCollectImpl();
|
||||
bool IsBlockingPhase();
|
||||
|
||||
void BlockingMark();
|
||||
void MarkNewReachable();
|
||||
|
|
|
@ -271,7 +271,7 @@ public:
|
|||
int gcSpin = (int)GCConfig::GetGCSpin();
|
||||
if (gcSpin == -1)
|
||||
{
|
||||
return 5;
|
||||
return 10;
|
||||
}
|
||||
|
||||
return gcSpin;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue