Our ObjectType to size map handles a map between pointers to strings like "MemoryCache.Image" and the corresponding allocated size. The builders fetch the data and creates hierarchical structure. This solution is not scalable solution. I'd like to add another types and need to implement additional builders.
Created attachment 168439 [details] Patch
Comment on attachment 168439 [details] Patch Attachment 168439 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/14282043 New failing tests: inspector/profiler/memory-instrumentation-cached-images.html
Comment on attachment 168439 [details] Patch Attachment 168439 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/14278051 New failing tests: inspector/profiler/memory-instrumentation-canvas.html inspector/profiler/memory-instrumentation-cached-images.html
Comment on attachment 168439 [details] Patch Attachment 168439 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/14262594 New failing tests: inspector/profiler/memory-instrumentation-cached-images.html
Created attachment 168556 [details] Patch
Comment on attachment 168556 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=168556&action=review > Source/WebCore/inspector/InspectorMemoryAgent.cpp:126 > + if (objectType.endsWith(".used", false)) Can we check if the parent block already exists and contains size value? Or better always sum up children sizes. > Source/WebCore/inspector/MemoryInstrumentationImpl.cpp:43 > + // TypeToSizeMap uses const char* as the key. You should probably note that we compare pointers not strings and use hash for pointer not string.
Committed r131290: <http://trac.webkit.org/changeset/131290>