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

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

Issue 2329463004: ABANDONED CL: Changes needed to make things compile after running rewrite_to_chrome_style tool. (Closed)
Patch Set: Rebasing the fixes... Created 3 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
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 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 1024); 1146 1024);
1147 DEFINE_STATIC_LOCAL(CustomCountHistogram, collectionRateHistogram, 1147 DEFINE_STATIC_LOCAL(CustomCountHistogram, collectionRateHistogram,
1148 ("BlinkGC.CollectionRate", 1, 100, 20)); 1148 ("BlinkGC.CollectionRate", 1, 100, 20));
1149 collectionRateHistogram.count(static_cast<int>(100 * collectionRate)); 1149 collectionRateHistogram.count(static_cast<int>(100 * collectionRate));
1150 DEFINE_STATIC_LOCAL( 1150 DEFINE_STATIC_LOCAL(
1151 CustomCountHistogram, timeForSweepHistogram, 1151 CustomCountHistogram, timeForSweepHistogram,
1152 ("BlinkGC.TimeForSweepingAllObjects", 1, 10 * 1000, 50)); 1152 ("BlinkGC.TimeForSweepingAllObjects", 1, 10 * 1000, 50));
1153 timeForSweepHistogram.count(m_accumulatedSweepingTime); 1153 timeForSweepHistogram.count(m_accumulatedSweepingTime);
1154 1154
1155 #define COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(GCReason) \ 1155 #define COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(GCReason) \
1156 case BlinkGC::GCReason: { \ 1156 case BlinkGC::k##GCReason: { \
1157 DEFINE_STATIC_LOCAL(CustomCountHistogram, histogram, \ 1157 DEFINE_STATIC_LOCAL(CustomCountHistogram, histogram, \
1158 ("BlinkGC.CollectionRate_" #GCReason, 1, 100, 20)); \ 1158 ("BlinkGC.CollectionRate_" #GCReason, 1, 100, 20)); \
1159 histogram.count(static_cast<int>(100 * collectionRate)); \ 1159 histogram.count(static_cast<int>(100 * collectionRate)); \
1160 break; \ 1160 break; \
1161 } 1161 }
1162 1162
1163 switch (m_heap->lastGCReason()) { 1163 switch (heap_->lastGCReason()) {
1164 /* DO NOT SUBMIT - Conflict resolution helper:
1165 * important to use IdleGC, rather than kIdleGC below - stringification */
1164 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(IdleGC) 1166 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(IdleGC)
1165 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(PreciseGC) 1167 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(PreciseGC)
1166 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(ConservativeGC) 1168 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(ConservativeGC)
1167 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(ForcedGC) 1169 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(ForcedGC)
1168 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(MemoryPressureGC) 1170 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(MemoryPressureGC)
1169 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(PageNavigationGC) 1171 COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(PageNavigationGC)
1172 /* DO NOT SUBMIT - Conflict resolution helper:
1173 * important to use IdleGC, rather than kIdleGC above - stringification */
1170 default: 1174 default:
1171 break; 1175 break;
1172 } 1176 }
1173 } 1177 }
1174 1178
1175 switch (gcState()) { 1179 switch (gcState()) {
1176 case Sweeping: 1180 case Sweeping:
1177 setGCState(NoGCScheduled); 1181 setGCState(NoGCScheduled);
1178 break; 1182 break;
1179 case SweepingAndPreciseGCScheduled: 1183 case SweepingAndPreciseGCScheduled:
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 String threadDumpName = String::format("blink_gc/thread_%lu", 1483 String threadDumpName = String::format("blink_gc/thread_%lu",
1480 static_cast<unsigned long>(m_thread)); 1484 static_cast<unsigned long>(m_thread));
1481 const String heapsDumpName = threadDumpName + "/heaps"; 1485 const String heapsDumpName = threadDumpName + "/heaps";
1482 const String classesDumpName = threadDumpName + "/classes"; 1486 const String classesDumpName = threadDumpName + "/classes";
1483 1487
1484 int numberOfHeapsReported = 0; 1488 int numberOfHeapsReported = 0;
1485 #define SNAPSHOT_HEAP(ArenaType) \ 1489 #define SNAPSHOT_HEAP(ArenaType) \
1486 { \ 1490 { \
1487 numberOfHeapsReported++; \ 1491 numberOfHeapsReported++; \
1488 switch (type) { \ 1492 switch (type) { \
1489 case SnapshotType::HeapSnapshot: \ 1493 case SnapshotType::kHeapSnapshot: \
1490 m_arenas[BlinkGC::ArenaType##ArenaIndex]->takeSnapshot( \ 1494 arenas_[BlinkGC::k##ArenaType##ArenaIndex]->TakeSnapshot( \
1491 heapsDumpName + "/" #ArenaType, info); \ 1495 heaps_dump_name + "/" #ArenaType, info); \
1492 break; \ 1496 break; \
1493 case SnapshotType::FreelistSnapshot: \ 1497 case SnapshotType::kFreelistSnapshot: \
1494 m_arenas[BlinkGC::ArenaType##ArenaIndex]->takeFreelistSnapshot( \ 1498 arenas_[BlinkGC::k##ArenaType##ArenaIndex]->TakeFreelistSnapshot( \
1495 heapsDumpName + "/" #ArenaType); \ 1499 heaps_dump_name + "/" #ArenaType); \
1496 break; \ 1500 break; \
1497 default: \ 1501 default: \
1498 ASSERT_NOT_REACHED(); \ 1502 ASSERT_NOT_REACHED(); \
1499 } \ 1503 } \
1500 } 1504 }
1501 1505
1506 /* DO NOT SUBMIT - Conflict resolution helper:
1507 * Important to use NormalPage instead of kNormalPage1 below */
1502 SNAPSHOT_HEAP(NormalPage1); 1508 SNAPSHOT_HEAP(NormalPage1);
1503 SNAPSHOT_HEAP(NormalPage2); 1509 SNAPSHOT_HEAP(NormalPage2);
1504 SNAPSHOT_HEAP(NormalPage3); 1510 SNAPSHOT_HEAP(NormalPage3);
1505 SNAPSHOT_HEAP(NormalPage4); 1511 SNAPSHOT_HEAP(NormalPage4);
1506 SNAPSHOT_HEAP(EagerSweep); 1512 SNAPSHOT_HEAP(EagerSweep);
1507 SNAPSHOT_HEAP(Vector1); 1513 SNAPSHOT_HEAP(Vector1);
1508 SNAPSHOT_HEAP(Vector2); 1514 SNAPSHOT_HEAP(Vector2);
1509 SNAPSHOT_HEAP(Vector3); 1515 SNAPSHOT_HEAP(Vector3);
1510 SNAPSHOT_HEAP(Vector4); 1516 SNAPSHOT_HEAP(Vector4);
1511 SNAPSHOT_HEAP(InlineVector); 1517 SNAPSHOT_HEAP(InlineVector);
1512 SNAPSHOT_HEAP(HashTable); 1518 SNAPSHOT_HEAP(HashTable);
1513 SNAPSHOT_HEAP(LargeObject); 1519 SNAPSHOT_HEAP(LargeObject);
1520 /* DO NOT SUBMIT - Conflict resolution helper:
1521 * Important to use LargeObject instead of kLargeObject above */
1514 FOR_EACH_TYPED_ARENA(SNAPSHOT_HEAP); 1522 FOR_EACH_TYPED_ARENA(SNAPSHOT_HEAP);
1515 1523
1516 ASSERT(numberOfHeapsReported == BlinkGC::NumberOfArenas); 1524 ASSERT(numberOfHeapsReported == BlinkGC::NumberOfArenas);
1517 1525
1518 #undef SNAPSHOT_HEAP 1526 #undef SNAPSHOT_HEAP
1519 1527
1520 if (type == SnapshotType::FreelistSnapshot) 1528 if (type == SnapshotType::FreelistSnapshot)
1521 return; 1529 return;
1522 1530
1523 size_t totalLiveCount = 0; 1531 size_t totalLiveCount = 0;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, 1693 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep,
1686 BlinkGC::ForcedGC); 1694 BlinkGC::ForcedGC);
1687 size_t liveObjects = heap().heapStats().markedObjectSize(); 1695 size_t liveObjects = heap().heapStats().markedObjectSize();
1688 if (liveObjects == previousLiveObjects) 1696 if (liveObjects == previousLiveObjects)
1689 break; 1697 break;
1690 previousLiveObjects = liveObjects; 1698 previousLiveObjects = liveObjects;
1691 } 1699 }
1692 } 1700 }
1693 1701
1694 } // namespace blink 1702 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | third_party/WebKit/Source/platform/heap/asm/SaveRegisters_arm.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698