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

Unified Diff: Source/platform/heap/Heap.h

Issue 1200833008: Adding freelist statistics to blink gc dump provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@oilpan_n2
Patch Set: Nits. 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 | « no previous file | Source/platform/heap/Heap.cpp » ('j') | Source/platform/heap/Heap.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Heap.h
diff --git a/Source/platform/heap/Heap.h b/Source/platform/heap/Heap.h
index 10a873988cf15c42ed1635cae3b7560d05d27621..e075683c5afbc41c2b66cf64ceb5e8cf5c97e859 100644
--- a/Source/platform/heap/Heap.h
+++ b/Source/platform/heap/Heap.h
@@ -656,6 +656,7 @@ public:
// All FreeListEntries in the given bucket, n, have size >= 2^n.
static int bucketIndexForSize(size_t);
+ void takeSnapshot(const String& dumpBaseName);
#if ENABLE(GC_PROFILING)
struct PerBucketFreeListStats {
size_t entryCount;
@@ -693,6 +694,7 @@ public:
#if ENABLE(ASSERT) || ENABLE(GC_PROFILING)
BasePage* findPageFromAddress(Address);
#endif
+ virtual void takeFreelistSnapshot(String dumpBaseName) { };
#if ENABLE(GC_PROFILING)
void snapshot(TracedValue*, ThreadState::SnapshotInfo*);
virtual void snapshotFreeList(TracedValue&) { };
@@ -752,6 +754,7 @@ public:
virtual bool isConsistentForGC() override;
bool pagesToBeSweptContains(Address);
#endif
+ void takeFreelistSnapshot(String dumpBaseName) override;
#if ENABLE(GC_PROFILING)
void snapshotFreeList(TracedValue&) override;
#endif
@@ -785,11 +788,9 @@ private:
// The size of promptly freed objects in the heap.
size_t m_promptlyFreedSize;
-#if ENABLE(GC_PROFILING)
size_t m_cumulativeAllocationSize;
size_t m_allocationCount;
size_t m_inlineAllocationCount;
-#endif
};
class LargeObjectHeap final : public BaseHeap {
@@ -1310,15 +1311,11 @@ void HeapObjectHeader::markDead()
inline Address NormalPageHeap::allocateObject(size_t allocationSize, size_t gcInfoIndex)
{
-#if ENABLE(GC_PROFILING)
haraken 2015/06/23 05:38:58 This function is performance-sensitive and we don'
ssid 2015/06/23 06:03:39 This means that these values will never be added t
haraken 2015/06/23 06:24:24 Yeah, it's a bit unfortunate we can't have the val
ssid 2015/06/23 07:39:56 Okay, removing it.
m_cumulativeAllocationSize += allocationSize;
++m_allocationCount;
-#endif
if (LIKELY(allocationSize <= m_remainingAllocationSize)) {
-#if ENABLE(GC_PROFILING)
++m_inlineAllocationCount;
-#endif
Address headerAddress = m_currentAllocationPoint;
m_currentAllocationPoint += allocationSize;
m_remainingAllocationSize -= allocationSize;
« no previous file with comments | « no previous file | Source/platform/heap/Heap.cpp » ('j') | Source/platform/heap/Heap.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698