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

Side by Side Diff: Source/platform/heap/HeapTest.cpp

Issue 927213002: [Oilpan] Set stack limit using estimated sizes (Re-land) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Work for comments Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/platform/heap/StackFrameDepth.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 5458 matching lines...) Expand 10 before | Expand all | Expand 10 after
5469 static int sTraceLazy; 5469 static int sTraceLazy;
5470 }; 5470 };
5471 5471
5472 int DeepEagerly::sTraceCalls = 0; 5472 int DeepEagerly::sTraceCalls = 0;
5473 int DeepEagerly::sTraceLazy = 0; 5473 int DeepEagerly::sTraceLazy = 0;
5474 5474
5475 TEST(HeapTest, TraceDeepEagerly) 5475 TEST(HeapTest, TraceDeepEagerly)
5476 { 5476 {
5477 #if !ENABLE(ASSERT) 5477 #if !ENABLE(ASSERT)
5478 DeepEagerly* obj = nullptr; 5478 DeepEagerly* obj = nullptr;
5479 for (int i = 0; i < 10000; i++) 5479 for (int i = 0; i < 2000000; i++)
5480 obj = new DeepEagerly(obj); 5480 obj = new DeepEagerly(obj);
5481 5481
5482 Persistent<DeepEagerly> persistent(obj); 5482 Persistent<DeepEagerly> persistent(obj);
5483 Heap::collectGarbage(ThreadState::NoHeapPointersOnStack); 5483 Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
5484 5484
5485 // Verify that the DeepEagerly chain isn't completely unravelled 5485 // Verify that the DeepEagerly chain isn't completely unravelled
5486 // by performing eager trace() calls, but the explicit mark 5486 // by performing eager trace() calls, but the explicit mark
5487 // stack is switched once some nesting limit is exceeded. 5487 // stack is switched once some nesting limit is exceeded.
5488 EXPECT_GT(DeepEagerly::sTraceLazy, 2); 5488 EXPECT_GT(DeepEagerly::sTraceLazy, 2);
5489 #endif 5489 #endif
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
5565 5565
5566 TEST(HeapTest, StackGrowthDirection) 5566 TEST(HeapTest, StackGrowthDirection)
5567 { 5567 {
5568 // The implementation of marking probes stack usage as it runs, 5568 // The implementation of marking probes stack usage as it runs,
5569 // and has a builtin assumption that the stack grows towards 5569 // and has a builtin assumption that the stack grows towards
5570 // lower addresses. 5570 // lower addresses.
5571 EXPECT_EQ(GrowsTowardsLower, stackGrowthDirection()); 5571 EXPECT_EQ(GrowsTowardsLower, stackGrowthDirection());
5572 } 5572 }
5573 5573
5574 } // namespace blink 5574 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/platform/heap/StackFrameDepth.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698