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

Side by Side Diff: third_party/WebKit/Source/platform/heap/ThreadState.cpp

Issue 2611823003: ABANDONED CL: Changes to compile and pass tests after Big Blink Rename (excluding functions). (Closed)
Patch Set: Inducing merge conflicts to force human review and changes after rename. Created 3 years, 11 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
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 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 1024); 1292 1024);
1293 DEFINE_STATIC_LOCAL(CustomCountHistogram, collectionRateHistogram, 1293 DEFINE_STATIC_LOCAL(CustomCountHistogram, collectionRateHistogram,
1294 ("BlinkGC.CollectionRate", 1, 100, 20)); 1294 ("BlinkGC.CollectionRate", 1, 100, 20));
1295 collectionRateHistogram.count(static_cast<int>(100 * collectionRate)); 1295 collectionRateHistogram.count(static_cast<int>(100 * collectionRate));
1296 DEFINE_STATIC_LOCAL( 1296 DEFINE_STATIC_LOCAL(
1297 CustomCountHistogram, timeForSweepHistogram, 1297 CustomCountHistogram, timeForSweepHistogram,
1298 ("BlinkGC.TimeForSweepingAllObjects", 1, 10 * 1000, 50)); 1298 ("BlinkGC.TimeForSweepingAllObjects", 1, 10 * 1000, 50));
1299 timeForSweepHistogram.count(m_accumulatedSweepingTime); 1299 timeForSweepHistogram.count(m_accumulatedSweepingTime);
1300 1300
1301 #define COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(GCReason) \ 1301 #define COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(GCReason) \
1302 case BlinkGC::GCReason: { \ 1302 case BlinkGC::k##GCReason: { \
1303 DEFINE_STATIC_LOCAL(CustomCountHistogram, histogram, \ 1303 DEFINE_STATIC_LOCAL(CustomCountHistogram, histogram, \
1304 ("BlinkGC.CollectionRate_" #GCReason, 1, 100, 20)); \ 1304 ("BlinkGC.CollectionRate_" #GCReason, 1, 100, 20)); \
1305 histogram.count(static_cast<int>(100 * collectionRate)); \ 1305 histogram.count(static_cast<int>(100 * collectionRate)); \
1306 break; \ 1306 break; \
1307 } 1307 }
1308 1308
1309 switch (m_heap->lastGCReason()) { 1309 switch (heap_->lastGCReason()) {
1310 /* DO NOT SUBMIT - Conflict resolution helper:
1311 * important to use IdleGC, rather than kIdleGC below - stringification */
1310 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(IdleGC) 1312 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(IdleGC)
1311 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(PreciseGC) 1313 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(PreciseGC)
1312 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(ConservativeGC) 1314 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(ConservativeGC)
1313 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(ForcedGC) 1315 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(ForcedGC)
1314 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(MemoryPressureGC) 1316 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(MemoryPressureGC)
1315 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(PageNavigationGC) 1317 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(PageNavigationGC)
1318 /* DO NOT SUBMIT - Conflict resolution helper:
1319 * important to use IdleGC, rather than kIdleGC above - stringification */
1316 default: 1320 default:
1317 break; 1321 break;
1318 } 1322 }
1319 } 1323 }
1320 1324
1321 switch (gcState()) { 1325 switch (gcState()) {
1322 case Sweeping: 1326 case Sweeping:
1323 setGCState(NoGCScheduled); 1327 setGCState(NoGCScheduled);
1324 break; 1328 break;
1325 case SweepingAndPreciseGCScheduled: 1329 case SweepingAndPreciseGCScheduled:
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 static_cast<unsigned long>(m_thread)); 1638 static_cast<unsigned long>(m_thread));
1635 const String heapsDumpName = threadDumpName + "/heaps"; 1639 const String heapsDumpName = threadDumpName + "/heaps";
1636 const String classesDumpName = threadDumpName + "/classes"; 1640 const String classesDumpName = threadDumpName + "/classes";
1637 1641
1638 int numberOfHeapsReported = 0; 1642 int numberOfHeapsReported = 0;
1639 #define SNAPSHOT_HEAP(ArenaType) \ 1643 #define SNAPSHOT_HEAP(ArenaType) \
1640 { \ 1644 { \
1641 numberOfHeapsReported++; \ 1645 numberOfHeapsReported++; \
1642 switch (type) { \ 1646 switch (type) { \
1643 case SnapshotType::HeapSnapshot: \ 1647 case SnapshotType::HeapSnapshot: \
1644 m_arenas[BlinkGC::ArenaType##ArenaIndex]->takeSnapshot( \ 1648 m_arenas[BlinkGC::k##ArenaType##ArenaIndex]->takeSnapshot( \
1645 heapsDumpName + "/" #ArenaType, info); \ 1649 heapsDumpName + "/" #ArenaType, info); \
1646 break; \ 1650 break; \
1647 case SnapshotType::FreelistSnapshot: \ 1651 case SnapshotType::FreelistSnapshot: \
1648 m_arenas[BlinkGC::ArenaType##ArenaIndex]->takeFreelistSnapshot( \ 1652 m_arenas[BlinkGC::k##ArenaType##ArenaIndex]->takeFreelistSnapshot( \
1649 heapsDumpName + "/" #ArenaType); \ 1653 heapsDumpName + "/" #ArenaType); \
1650 break; \ 1654 break; \
1651 default: \ 1655 default: \
1652 ASSERT_NOT_REACHED(); \ 1656 ASSERT_NOT_REACHED(); \
1653 } \ 1657 } \
1654 } 1658 }
1655 1659
1660 /* DO NOT SUBMIT - Conflict resolution helper:
1661 * Important to use NormalPage instead of kNormalPage1 below */
1656 SNAPSHOT_HEAP(NormalPage1); 1662 SNAPSHOT_HEAP(NormalPage1);
1657 SNAPSHOT_HEAP(NormalPage2); 1663 SNAPSHOT_HEAP(NormalPage2);
1658 SNAPSHOT_HEAP(NormalPage3); 1664 SNAPSHOT_HEAP(NormalPage3);
1659 SNAPSHOT_HEAP(NormalPage4); 1665 SNAPSHOT_HEAP(NormalPage4);
1660 SNAPSHOT_HEAP(EagerSweep); 1666 SNAPSHOT_HEAP(EagerSweep);
1661 SNAPSHOT_HEAP(Vector1); 1667 SNAPSHOT_HEAP(Vector1);
1662 SNAPSHOT_HEAP(Vector2); 1668 SNAPSHOT_HEAP(Vector2);
1663 SNAPSHOT_HEAP(Vector3); 1669 SNAPSHOT_HEAP(Vector3);
1664 SNAPSHOT_HEAP(Vector4); 1670 SNAPSHOT_HEAP(Vector4);
1665 SNAPSHOT_HEAP(InlineVector); 1671 SNAPSHOT_HEAP(InlineVector);
1666 SNAPSHOT_HEAP(HashTable); 1672 SNAPSHOT_HEAP(HashTable);
1667 SNAPSHOT_HEAP(LargeObject); 1673 SNAPSHOT_HEAP(LargeObject);
1674 /* DO NOT SUBMIT - Conflict resolution helper:
1675 * Important to use LargeObject instead of kLargeObject above */
1668 FOR_EACH_TYPED_ARENA(SNAPSHOT_HEAP); 1676 FOR_EACH_TYPED_ARENA(SNAPSHOT_HEAP);
1669 1677
1670 ASSERT(numberOfHeapsReported == BlinkGC::NumberOfArenas); 1678 ASSERT(numberOfHeapsReported == BlinkGC::NumberOfArenas);
1671 1679
1672 #undef SNAPSHOT_HEAP 1680 #undef SNAPSHOT_HEAP
1673 1681
1674 if (type == SnapshotType::FreelistSnapshot) 1682 if (type == SnapshotType::FreelistSnapshot)
1675 return; 1683 return;
1676 1684
1677 size_t totalLiveCount = 0; 1685 size_t totalLiveCount = 0;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1877 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, 1885 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep,
1878 BlinkGC::ForcedGC); 1886 BlinkGC::ForcedGC);
1879 size_t liveObjects = heap().heapStats().markedObjectSize(); 1887 size_t liveObjects = heap().heapStats().markedObjectSize();
1880 if (liveObjects == previousLiveObjects) 1888 if (liveObjects == previousLiveObjects)
1881 break; 1889 break;
1882 previousLiveObjects = liveObjects; 1890 previousLiveObjects = liveObjects;
1883 } 1891 }
1884 } 1892 }
1885 1893
1886 } // namespace blink 1894 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698