Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1462)

Unified Diff: test/unittests/heap/gc-tracer-unittest.cc

Issue 2310143002: [heap] Introduce enum of garbage collection reasons. (Closed)
Patch Set: rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-weaksets.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/heap/gc-tracer-unittest.cc
diff --git a/test/unittests/heap/gc-tracer-unittest.cc b/test/unittests/heap/gc-tracer-unittest.cc
index 84e4d973e215709e9602ff9e193abaf7c773f082..8af8689226e9b0847acb0e202c47eafbd927ed0b 100644
--- a/test/unittests/heap/gc-tracer-unittest.cc
+++ b/test/unittests/heap/gc-tracer-unittest.cc
@@ -160,7 +160,8 @@ TEST_F(GCTracerTest, RegularScope) {
EXPECT_DOUBLE_EQ(0.0, tracer->current_.scopes[GCTracer::Scope::MC_MARK]);
// Sample not added because it's not within a started tracer.
tracer->AddScopeSample(GCTracer::Scope::MC_MARK, 100);
- tracer->Start(MARK_COMPACTOR, "gc unittest", "collector unittest");
+ tracer->Start(MARK_COMPACTOR, GarbageCollectionReason::kTesting,
+ "collector unittest");
tracer->AddScopeSample(GCTracer::Scope::MC_MARK, 100);
tracer->Stop(MARK_COMPACTOR);
EXPECT_DOUBLE_EQ(100.0, tracer->current_.scopes[GCTracer::Scope::MC_MARK]);
@@ -174,7 +175,8 @@ TEST_F(GCTracerTest, IncrementalScope) {
0.0, tracer->current_.scopes[GCTracer::Scope::MC_INCREMENTAL_FINALIZE]);
// Sample is added because its ScopeId is listed as incremental sample.
tracer->AddScopeSample(GCTracer::Scope::MC_INCREMENTAL_FINALIZE, 100);
- tracer->Start(MARK_COMPACTOR, "gc unittest", "collector unittest");
+ tracer->Start(MARK_COMPACTOR, GarbageCollectionReason::kTesting,
+ "collector unittest");
// Switch to incremental MC to enable writing back incremental scopes.
tracer->current_.type = GCTracer::Event::INCREMENTAL_MARK_COMPACTOR;
tracer->AddScopeSample(GCTracer::Scope::MC_INCREMENTAL_FINALIZE, 100);
@@ -189,7 +191,8 @@ TEST_F(GCTracerTest, IncrementalMarkingDetails) {
// Round 1.
tracer->AddScopeSample(GCTracer::Scope::MC_INCREMENTAL_FINALIZE, 50);
- tracer->Start(MARK_COMPACTOR, "gc unittest", "collector unittest");
+ tracer->Start(MARK_COMPACTOR, GarbageCollectionReason::kTesting,
+ "collector unittest");
// Switch to incremental MC to enable writing back incremental scopes.
tracer->current_.type = GCTracer::Event::INCREMENTAL_MARK_COMPACTOR;
tracer->AddScopeSample(GCTracer::Scope::MC_INCREMENTAL_FINALIZE, 100);
@@ -213,7 +216,8 @@ TEST_F(GCTracerTest, IncrementalMarkingDetails) {
// Round 2. Cumulative numbers should add up, others should be reset.
tracer->AddScopeSample(GCTracer::Scope::MC_INCREMENTAL_FINALIZE, 13);
tracer->AddScopeSample(GCTracer::Scope::MC_INCREMENTAL_FINALIZE, 15);
- tracer->Start(MARK_COMPACTOR, "gc unittest", "collector unittest");
+ tracer->Start(MARK_COMPACTOR, GarbageCollectionReason::kTesting,
+ "collector unittest");
// Switch to incremental MC to enable writing back incremental scopes.
tracer->current_.type = GCTracer::Event::INCREMENTAL_MARK_COMPACTOR;
tracer->AddScopeSample(GCTracer::Scope::MC_INCREMENTAL_FINALIZE, 122);
« no previous file with comments | « test/cctest/test-weaksets.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698