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

Side by Side Diff: Source/wtf/Partitions.cpp

Issue 1315113006: Add partitionsOutOfMemoryUsingXXX to know Blink memory usage from OOM crash reports (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 PartitionAllocatorGeneric Partitions::m_bufferAllocator; 44 PartitionAllocatorGeneric Partitions::m_bufferAllocator;
45 SizeSpecificPartitionAllocator<3328> Partitions::m_nodeAllocator; 45 SizeSpecificPartitionAllocator<3328> Partitions::m_nodeAllocator;
46 SizeSpecificPartitionAllocator<1024> Partitions::m_layoutAllocator; 46 SizeSpecificPartitionAllocator<1024> Partitions::m_layoutAllocator;
47 HistogramEnumerationFunction Partitions::m_histogramEnumeration = nullptr; 47 HistogramEnumerationFunction Partitions::m_histogramEnumeration = nullptr;
48 48
49 void Partitions::initialize() 49 void Partitions::initialize()
50 { 50 {
51 spinLockLock(&s_initializationLock); 51 spinLockLock(&s_initializationLock);
52 52
53 if (!s_initialized) { 53 if (!s_initialized) {
54 partitionAllocGlobalInit(&Partitions::totalSizeOfCommittedPages);
54 m_fastMallocAllocator.init(); 55 m_fastMallocAllocator.init();
55 m_bufferAllocator.init(); 56 m_bufferAllocator.init();
56 m_nodeAllocator.init(); 57 m_nodeAllocator.init();
57 m_layoutAllocator.init(); 58 m_layoutAllocator.init();
58 s_initialized = true; 59 s_initialized = true;
59 } 60 }
60 61
61 spinLockUnlock(&s_initializationLock); 62 spinLockUnlock(&s_initializationLock);
62 } 63 }
63 64
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // accessed only on the main thread. 117 // accessed only on the main thread.
117 ASSERT(isMainThread()); 118 ASSERT(isMainThread());
118 119
119 partitionDumpStatsGeneric(fastMallocPartition(), "fast_malloc_partition", is LightDump, partitionStatsDumper); 120 partitionDumpStatsGeneric(fastMallocPartition(), "fast_malloc_partition", is LightDump, partitionStatsDumper);
120 partitionDumpStatsGeneric(bufferPartition(), "buffer_partition", isLightDump , partitionStatsDumper); 121 partitionDumpStatsGeneric(bufferPartition(), "buffer_partition", isLightDump , partitionStatsDumper);
121 partitionDumpStats(nodePartition(), "node_partition", isLightDump, partition StatsDumper); 122 partitionDumpStats(nodePartition(), "node_partition", isLightDump, partition StatsDumper);
122 partitionDumpStats(layoutPartition(), "layout_partition", isLightDump, parti tionStatsDumper); 123 partitionDumpStats(layoutPartition(), "layout_partition", isLightDump, parti tionStatsDumper);
123 } 124 }
124 125
125 } // namespace WTF 126 } // namespace WTF
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698