mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2025-02-25 14:53:32 +00:00
!8400 Fix SetWaterLineWithoutGC data race
Merge pull request !8400 from dingwen/waterline_br
This commit is contained in:
commit
ee5e505013
@ -2130,7 +2130,6 @@ void Heap::NotifyFinishColdStart(bool isMainThread)
|
||||
static_cast<int64_t>(config_.GetOldSpaceStepOvershootSize()) - semiRemainSize;
|
||||
// overshoot size should be larger than 0.
|
||||
GetNewSpace()->SetOverShootSize(std::max(overshootSize, (int64_t)0));
|
||||
GetNewSpace()->SetWaterLineWithoutGC();
|
||||
|
||||
if (isMainThread && CheckCanTriggerConcurrentMarking()) {
|
||||
markType_ = MarkType::MARK_FULL;
|
||||
@ -2172,7 +2171,6 @@ void Heap::HandleExitHighSensitiveEvent()
|
||||
static_cast<int64_t>(config_.GetOldSpaceStepOvershootSize()) - semiRemainSize;
|
||||
// overshoot size should be larger than 0.
|
||||
GetNewSpace()->SetOverShootSize(std::max(overshootSize, (int64_t)0));
|
||||
GetNewSpace()->SetWaterLineWithoutGC();
|
||||
|
||||
// fixme: IncrementalMarking and IdleCollection is currently not enabled
|
||||
TryTriggerIncrementalMarking();
|
||||
|
@ -417,23 +417,6 @@ void SemiSpace::SetWaterLine()
|
||||
}
|
||||
}
|
||||
|
||||
void SemiSpace::SetWaterLineWithoutGC()
|
||||
{
|
||||
waterLine_ = allocator_.GetTop();
|
||||
Region *last = GetCurrentRegion();
|
||||
if (last != nullptr) {
|
||||
last->SetGCFlag(RegionGCFlags::HAS_AGE_MARK);
|
||||
|
||||
EnumerateRegions([&last](Region *current) {
|
||||
if (current != last) {
|
||||
current->SetGCFlag(RegionGCFlags::BELOW_AGE_MARK);
|
||||
}
|
||||
});
|
||||
survivalObjectSize_ += allocateAfterLastGC_;
|
||||
}
|
||||
allocateAfterLastGC_ = 0;
|
||||
}
|
||||
|
||||
size_t SemiSpace::GetHeapObjectSize() const
|
||||
{
|
||||
return survivalObjectSize_ + allocateAfterLastGC_;
|
||||
|
@ -145,7 +145,6 @@ public:
|
||||
void SetOverShootSize(size_t size);
|
||||
bool AdjustCapacity(size_t allocatedSizeSinceGC, JSThread *thread);
|
||||
void SetWaterLine();
|
||||
void SetWaterLineWithoutGC();
|
||||
|
||||
uintptr_t GetWaterLine() const
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user