mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 13:05:47 +00:00
Fail the spill test when its readers do not go quiet before the measurement
This commit is contained in:
1 parent
498a3a653a
commit
29350f1bd5
1 file changed
+7
@@ -171,6 +171,13 @@ int main(int argc, char **argv) {
|
||||
if (undumpable) {
|
||||
shared->quiet = 1;
|
||||
for (int waited = 0; __atomic_load_n(&shared->quieted, __ATOMIC_ACQUIRE) < THREADS && waited < 5000; waited += 1) nap(1);
|
||||
if (__atomic_load_n(&shared->quieted, __ATOMIC_ACQUIRE) < THREADS) {
|
||||
// a reader still scanning would fault pages back in before the resident set is measured
|
||||
shared->stop = 1;
|
||||
kill(child, SIGKILL);
|
||||
waitpid(child, NULL, 0);
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
put(".hold", "4 0");
|
||||
kill(child, SIGURG);
|
||||
|
||||
Reference in new issue
Block a user