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

Unified Diff: third_party/WebKit/Source/wtf/allocator/Partitions.h

Issue 2509213003: DO NOT SUBMIT: enable v8bsc and instrument partitionlloc
Patch Set: misc -- most importantly, passing the actualSize to realloc Created 4 years, 1 month 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 | « third_party/WebKit/Source/wtf/allocator/PartitionAlloc.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/allocator/Partitions.h
diff --git a/third_party/WebKit/Source/wtf/allocator/Partitions.h b/third_party/WebKit/Source/wtf/allocator/Partitions.h
index 8fd74a3f73dc8bc2b0495b9a52a4108cdeff02fc..0081892647548fa5b7011d99b5f5cf966f194bd0 100644
--- a/third_party/WebKit/Source/wtf/allocator/Partitions.h
+++ b/third_party/WebKit/Source/wtf/allocator/Partitions.h
@@ -88,12 +88,18 @@ class WTF_EXPORT Partitions {
static void dumpMemoryStats(bool isLightDump, PartitionStatsDumper*);
ALWAYS_INLINE static void* bufferMalloc(size_t n, const char* typeName) {
- return partitionAllocGeneric(bufferPartition(), n, typeName);
+ void* p = partitionAllocGeneric(bufferPartition(), n, typeName);
+ if (strcmp(typeName, "SerializedScriptValue buffer") == 0)
+ LOG(ERROR) << "bufferMalloc(" << n << ", " << typeName << ") -> " << p;
+ return p;
}
ALWAYS_INLINE static void* bufferRealloc(void* p,
size_t n,
const char* typeName) {
- return partitionReallocGeneric(bufferPartition(), p, n, typeName);
+ void* p2 = partitionReallocGeneric(bufferPartition(), p, n, typeName);
+ if (strcmp(typeName, "SerializedScriptValue buffer") == 0)
+ LOG(ERROR) << "bufferRealloc(" << p << ", " << n << ", " << typeName << ") -> " << p2;
+ return p2;
}
ALWAYS_INLINE static void bufferFree(void* p) {
partitionFreeGeneric(bufferPartition(), p);
« no previous file with comments | « third_party/WebKit/Source/wtf/allocator/PartitionAlloc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698