OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 CString snippet = snippetForBuffer(buffers[i]); | 121 CString snippet = snippetForBuffer(buffers[i]); |
122 dataLogF("Buffer size=%8u %s\n", buffers[i]->size(), snippet.data()); | 122 dataLogF("Buffer size=%8u %s\n", buffers[i]->size(), snippet.data()); |
123 } | 123 } |
124 } | 124 } |
125 | 125 |
126 static void didCreateSharedBuffer(SharedBuffer* buffer) | 126 static void didCreateSharedBuffer(SharedBuffer* buffer) |
127 { | 127 { |
128 MutexLocker locker(statsMutex()); | 128 MutexLocker locker(statsMutex()); |
129 liveBuffers().insert(buffer); | 129 liveBuffers().insert(buffer); |
130 | 130 |
131 Platform::current()->mainThread()->taskRunner()->postTask(BLINK_FROM_HERE, b
ind(&printStats)); | 131 Platform::current()->mainThread()->taskRunner()->postTask(BLINK_FROM_HERE, W
TF::bind(&printStats)); |
132 } | 132 } |
133 | 133 |
134 static void willDestroySharedBuffer(SharedBuffer* buffer) | 134 static void willDestroySharedBuffer(SharedBuffer* buffer) |
135 { | 135 { |
136 MutexLocker locker(statsMutex()); | 136 MutexLocker locker(statsMutex()); |
137 liveBuffers().erase(buffer); | 137 liveBuffers().erase(buffer); |
138 } | 138 } |
139 | 139 |
140 #endif | 140 #endif |
141 | 141 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 // If there is data in the segments, then it should have been allocated | 414 // If there is data in the segments, then it should have been allocated |
415 // using fastMalloc. | 415 // using fastMalloc. |
416 const String dataDumpName = dumpPrefix + "/segments"; | 416 const String dataDumpName = dumpPrefix + "/segments"; |
417 auto dump = memoryDump->createMemoryAllocatorDump(dataDumpName); | 417 auto dump = memoryDump->createMemoryAllocatorDump(dataDumpName); |
418 dump->addScalar("size", "bytes", m_size); | 418 dump->addScalar("size", "bytes", m_size); |
419 memoryDump->addSuballocation(dump->guid(), String(WTF::Partitions::kAllo
catedObjectPoolName)); | 419 memoryDump->addSuballocation(dump->guid(), String(WTF::Partitions::kAllo
catedObjectPoolName)); |
420 } | 420 } |
421 } | 421 } |
422 | 422 |
423 } // namespace blink | 423 } // namespace blink |
OLD | NEW |