Skip to content

Commit

Permalink
Fix tripwire test for incremental Hades
Browse files Browse the repository at this point in the history
Summary:
The tripwire test currently does not trigger the tripwire for
incremental collections. This happens because we currently only check
the stats for a completed incremental OG collection during the next
YG collection.

Note that adding the tripwire check to the non-concurrent GC branch
in `waitForCollectionToFinish` is not sufficient because the OG
collection may complete immediately if there are very few objects,
and therefore it won't be active once `waitForCollectionToFinish` is
called.

This could technically happen with an OG collection too, if an OG
collection completes fully before a call to
`waitForCollectionToFinish`, then the tripwire check will happen at
the next YG instead. However, for the purposes of this test, that is
not possible, because the OG has to synchronise with the mutator in
`waitForCollectionToFinish` before it can complete the collection.

Reviewed By: dulinriley

Differential Revision: D24411327

fbshipit-source-id: 8cbe6e535829d9485b5947d46ed9846c9e0988e3
  • Loading branch information
neildhar authored and facebook-github-bot committed Oct 24, 2020
1 parent 43bea0c commit 7c1903d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/VM/gcs/HadesGC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,9 @@ void HadesGC::completeNonConcurrentOldGenCollection() {
"is enabled");
ogCollectionStats_->setEndTime();
concurrentPhase_ = Phase::None;
// Check the tripwire here since we know the incremental collection will
// always end on the mutator thread.
checkTripwireAndResetStats();
}

void HadesGC::completeMarking() {
Expand Down

0 comments on commit 7c1903d

Please sign in to comment.