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

Unified Diff: test/cctest/test-heap.cc

Issue 1167563005: Make old generation allocation throughput stats independent from the new space allocation throughpu… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cast Created 5 years, 6 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 | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index dcbe306ffa2a86cc8df042f60d95fcc2ea0506b3..02cd5608bef4aef12c7907c0e5ace11f72aa6b0e 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -5808,6 +5808,7 @@ TEST(OldSpaceAllocationCounter) {
Heap* heap = isolate->heap();
size_t counter1 = heap->OldGenerationAllocationCounter();
heap->CollectGarbage(NEW_SPACE);
+ heap->CollectGarbage(NEW_SPACE);
const size_t kSize = 1024;
AllocateInSpace(isolate, kSize, OLD_SPACE);
size_t counter2 = heap->OldGenerationAllocationCounter();
@@ -5868,12 +5869,13 @@ TEST(NewSpaceAllocationThroughput2) {
int time2 = 200;
size_t counter2 = 2000;
tracer->SampleAllocation(time2, counter2, 0);
- size_t throughput = tracer->AllocationThroughputInBytesPerMillisecond(100);
+ size_t throughput =
+ tracer->NewSpaceAllocationThroughputInBytesPerMillisecond(100);
CHECK_EQ((counter2 - counter1) / (time2 - time1), throughput);
int time3 = 1000;
size_t counter3 = 30000;
tracer->SampleAllocation(time3, counter3, 0);
- throughput = tracer->AllocationThroughputInBytesPerMillisecond(100);
+ throughput = tracer->NewSpaceAllocationThroughputInBytesPerMillisecond(100);
CHECK_EQ((counter3 - counter1) / (time3 - time1), throughput);
}
@@ -5932,12 +5934,14 @@ TEST(OldGenerationAllocationThroughput) {
int time2 = 200;
size_t counter2 = 2000;
tracer->SampleAllocation(time2, 0, counter2);
- size_t throughput = tracer->AllocationThroughputInBytesPerMillisecond(100);
+ size_t throughput =
+ tracer->OldGenerationAllocationThroughputInBytesPerMillisecond(100);
CHECK_EQ((counter2 - counter1) / (time2 - time1), throughput);
int time3 = 1000;
size_t counter3 = 30000;
tracer->SampleAllocation(time3, 0, counter3);
- throughput = tracer->AllocationThroughputInBytesPerMillisecond(100);
+ throughput =
+ tracer->OldGenerationAllocationThroughputInBytesPerMillisecond(100);
CHECK_EQ((counter3 - counter1) / (time3 - time1), throughput);
}
« no previous file with comments | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698