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

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

Issue 1312843010: [tracing] Fix PartitionAlloc dumper reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: const size_t ... meh 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
« no previous file with comments | « Source/platform/PartitionAllocMemoryDumpProvider.cpp ('k') | no next file » | 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 observedMaxSizeInMB = sizeInMB; 111 observedMaxSizeInMB = sizeInMB;
112 } 112 }
113 } 113 }
114 114
115 void Partitions::dumpMemoryStats(bool isLightDump, PartitionStatsDumper* partiti onStatsDumper) 115 void Partitions::dumpMemoryStats(bool isLightDump, PartitionStatsDumper* partiti onStatsDumper)
116 { 116 {
117 // Object model and rendering partitions are not thread safe and can be 117 // Object model and rendering partitions are not thread safe and can be
118 // accessed only on the main thread. 118 // accessed only on the main thread.
119 ASSERT(isMainThread()); 119 ASSERT(isMainThread());
120 120
121 partitionDumpStatsGeneric(fastMallocPartition(), "fast_malloc_partition", is LightDump, partitionStatsDumper); 121 partitionDumpStatsGeneric(fastMallocPartition(), "fast_malloc", isLightDump, partitionStatsDumper);
122 partitionDumpStatsGeneric(bufferPartition(), "buffer_partition", isLightDump , partitionStatsDumper); 122 partitionDumpStatsGeneric(bufferPartition(), "buffer", isLightDump, partitio nStatsDumper);
123 partitionDumpStats(nodePartition(), "node_partition", isLightDump, partition StatsDumper); 123 partitionDumpStats(nodePartition(), "node", isLightDump, partitionStatsDumpe r);
124 partitionDumpStats(layoutPartition(), "layout_partition", isLightDump, parti tionStatsDumper); 124 partitionDumpStats(layoutPartition(), "layout", isLightDump, partitionStatsD umper);
125 } 125 }
126 126
127 static NEVER_INLINE void partitionsOutOfMemoryUsing2G() 127 static NEVER_INLINE void partitionsOutOfMemoryUsing2G()
128 { 128 {
129 size_t signature = 2UL * 1024 * 1024 * 1024; 129 size_t signature = 2UL * 1024 * 1024 * 1024;
130 alias(&signature); 130 alias(&signature);
131 IMMEDIATE_CRASH(); 131 IMMEDIATE_CRASH();
132 } 132 }
133 133
134 static NEVER_INLINE void partitionsOutOfMemoryUsing1G() 134 static NEVER_INLINE void partitionsOutOfMemoryUsing1G()
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 if (totalUsage >= 64 * 1024 * 1024) 204 if (totalUsage >= 64 * 1024 * 1024)
205 partitionsOutOfMemoryUsing64M(); 205 partitionsOutOfMemoryUsing64M();
206 if (totalUsage >= 32 * 1024 * 1024) 206 if (totalUsage >= 32 * 1024 * 1024)
207 partitionsOutOfMemoryUsing32M(); 207 partitionsOutOfMemoryUsing32M();
208 if (totalUsage >= 16 * 1024 * 1024) 208 if (totalUsage >= 16 * 1024 * 1024)
209 partitionsOutOfMemoryUsing16M(); 209 partitionsOutOfMemoryUsing16M();
210 partitionsOutOfMemoryUsingLessThan16M(); 210 partitionsOutOfMemoryUsingLessThan16M();
211 } 211 }
212 212
213 } // namespace WTF 213 } // namespace WTF
OLDNEW
« no previous file with comments | « Source/platform/PartitionAllocMemoryDumpProvider.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698