-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[test] Run GC stress tests with multiple isolates.
Change-Id: I2524260703c39ca63cca49ae88620a1b70ff6d72 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336622 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
- Loading branch information
1 parent
9229abe
commit 1845b5a
Showing
3 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
runtime/tests/vm/dart/gc/chunked_binary_trees_array_isolates_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
// VMOptions= | ||
// VMOptions=--verify_store_buffer | ||
// VMOptions=--verify_after_marking | ||
// VMOptions=--runtime_allocate_old | ||
// VMOptions=--runtime_allocate_spill_tlab | ||
// VMOptions=--no_inline_alloc | ||
|
||
// Stress test for write barrier elimination that leaves many stores with | ||
// eliminated barriers that create the only reference to an object in flight at | ||
// the same time. | ||
|
||
import "dart:isolate"; | ||
import "chunked_binary_trees_array_test.dart" as test; | ||
|
||
child(port) { | ||
test.main(); | ||
port.send("done"); | ||
} | ||
|
||
main() { | ||
for (var i = 0; i < 2; i++) { | ||
var port; | ||
port = new RawReceivePort((_) { | ||
port.close(); | ||
}); | ||
Isolate.spawn(child, port.sendPort); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
runtime/tests/vm/dart/gc/chunked_binary_trees_isolates_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
// VMOptions= | ||
// VMOptions=--verify_store_buffer | ||
// VMOptions=--verify_after_marking | ||
// VMOptions=--runtime_allocate_old | ||
// VMOptions=--runtime_allocate_spill_tlab | ||
// VMOptions=--no_inline_alloc | ||
|
||
// Stress test for write barrier elimination that leaves many stores with | ||
// eliminated barriers that create the only reference to an object in flight at | ||
// the same time. | ||
|
||
import "dart:isolate"; | ||
import "chunked_binary_trees_test.dart" as test; | ||
|
||
child(port) { | ||
test.main(); | ||
port.send("done"); | ||
} | ||
|
||
main() { | ||
for (var i = 0; i < 2; i++) { | ||
var port; | ||
port = new RawReceivePort((_) { | ||
port.close(); | ||
}); | ||
Isolate.spawn(child, port.sendPort); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
// This test is a derivative of the Splay benchmark that is run with a variety | ||
// of different GC options. It makes for a good GC stress test because it | ||
// continuously makes small changes to a large, long-lived data structure, | ||
// stressing lots of combinations of references between new-gen and old-gen | ||
// objects, and between marked and unmarked objects. | ||
|
||
// VMOptions= | ||
// VMOptions=--profiler --no_concurrent_mark --no_concurrent_sweep | ||
// VMOptions=--profiler --no_concurrent_mark --concurrent_sweep | ||
// VMOptions=--profiler --no_concurrent_mark --use_compactor | ||
// VMOptions=--profiler --no_concurrent_mark --use_compactor --force_evacuation | ||
// VMOptions=--profiler --concurrent_mark --no_concurrent_sweep | ||
// VMOptions=--profiler --concurrent_mark --concurrent_sweep | ||
// VMOptions=--profiler --concurrent_mark --use_compactor | ||
// VMOptions=--profiler --concurrent_mark --use_compactor --force_evacuation | ||
// VMOptions=--profiler --scavenger_tasks=0 | ||
// VMOptions=--profiler --verify_before_gc | ||
// VMOptions=--profiler --verify_after_gc | ||
// VMOptions=--profiler --verify_before_gc --verify_after_gc | ||
// VMOptions=--profiler --verify_store_buffer | ||
// VMOptions=--profiler --verify_after_marking | ||
// VMOptions=--profiler --runtime_allocate_old | ||
// VMOptions=--profiler --runtime_allocate_spill_tlab | ||
// VMOptions=--profiler --no_inline_alloc | ||
|
||
import "dart:isolate"; | ||
import "splay_test.dart" as test; | ||
|
||
void main() { | ||
for (var i = 0; i < 2; i++) { | ||
var port; | ||
port = new RawReceivePort((_) { | ||
port.close(); | ||
}); | ||
Isolate.spawn(child, port.sendPort); | ||
} | ||
} | ||
|
||
void child(port) { | ||
test.main(); | ||
port.send("Done"); | ||
} |