OLD | NEW |
---|---|
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 Loading... | |
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); |
haraken
2015/09/07 23:24:26
I'd keep "_partition" for clarity.
Primiano Tucci (use gerrit)
2015/09/08 07:56:56
I did remove it because the dump path is now:
par
haraken
2015/09/08 08:07:33
ah, makes sense. Let's drop "_partition".
| |
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 Loading... | |
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 |
OLD | NEW |