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

Unified Diff: third_party/WebKit/Source/wtf/text/StringImpl.cpp

Issue 1474213002: [PartitionAlloc] Annotate common Blink types for heap profiling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ctti
Patch Set: Mark template specialisations as WTF_EXPORT Created 5 years 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/PartitionAllocator.cpp ('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/text/StringImpl.cpp
diff --git a/third_party/WebKit/Source/wtf/text/StringImpl.cpp b/third_party/WebKit/Source/wtf/text/StringImpl.cpp
index fc1dc7c81ceed57d47d4f2b946957f01572a6ab9..64bae95694bafcc6f7cbb224805a7a8969eb86fe 100644
--- a/third_party/WebKit/Source/wtf/text/StringImpl.cpp
+++ b/third_party/WebKit/Source/wtf/text/StringImpl.cpp
@@ -261,7 +261,7 @@ void StringStats::printStats()
void* StringImpl::operator new(size_t size)
{
ASSERT(size == sizeof(StringImpl));
- return Partitions::bufferMalloc(size, WTF_HEAP_PROFILER_TYPE_NAME(StringImpl));
+ return Partitions::bufferMalloc(size, "WTF::StringImpl");
}
void StringImpl::operator delete(void* ptr)
@@ -295,7 +295,7 @@ PassRefPtr<StringImpl> StringImpl::createUninitialized(unsigned length, LChar*&
// Allocate a single buffer large enough to contain the StringImpl
// struct as well as the data which it contains. This removes one
// heap allocation from this call.
- StringImpl* string = static_cast<StringImpl*>(Partitions::bufferMalloc(allocationSize<LChar>(length), WTF_HEAP_PROFILER_TYPE_NAME(StringImpl)));
+ StringImpl* string = static_cast<StringImpl*>(Partitions::bufferMalloc(allocationSize<LChar>(length), "WTF::StringImpl"));
data = reinterpret_cast<LChar*>(string + 1);
return adoptRef(new (string) StringImpl(length, Force8BitConstructor));
@@ -311,7 +311,7 @@ PassRefPtr<StringImpl> StringImpl::createUninitialized(unsigned length, UChar*&
// Allocate a single buffer large enough to contain the StringImpl
// struct as well as the data which it contains. This removes one
// heap allocation from this call.
- StringImpl* string = static_cast<StringImpl*>(Partitions::bufferMalloc(allocationSize<UChar>(length), WTF_HEAP_PROFILER_TYPE_NAME(StringImpl)));
+ StringImpl* string = static_cast<StringImpl*>(Partitions::bufferMalloc(allocationSize<UChar>(length), "WTF::StringImpl"));
data = reinterpret_cast<UChar*>(string + 1);
return adoptRef(new (string) StringImpl(length));
@@ -362,7 +362,7 @@ StringImpl* StringImpl::createStatic(const char* string, unsigned length, unsign
size_t size = sizeof(StringImpl) + length * sizeof(LChar);
WTF_ANNOTATE_SCOPED_MEMORY_LEAK;
- StringImpl* impl = static_cast<StringImpl*>(Partitions::bufferMalloc(size, WTF_HEAP_PROFILER_TYPE_NAME(StringImpl)));
+ StringImpl* impl = static_cast<StringImpl*>(Partitions::bufferMalloc(size, "WTF::StringImpl"));
LChar* data = reinterpret_cast<LChar*>(impl + 1);
impl = new (impl) StringImpl(length, hash, StaticString);
« no previous file with comments | « third_party/WebKit/Source/wtf/PartitionAllocator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698