Bug 90456 - Web Inspector: Count inspector memory used to traverse DOM in native memory snapshots.
Summary: Web Inspector: Count inspector memory used to traverse DOM in native memory s...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexei Filippov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-03 06:18 PDT by Alexei Filippov
Modified: 2012-07-10 12:11 PDT (History)
11 users (show)

See Also:


Attachments
Patch (6.04 KB, patch)
2012-07-03 06:28 PDT, Alexei Filippov
no flags Details | Formatted Diff | Diff
Patch (9.26 KB, patch)
2012-07-06 09:38 PDT, Alexei Filippov
no flags Details | Formatted Diff | Diff
Patch (9.47 KB, patch)
2012-07-10 10:06 PDT, Alexei Filippov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexei Filippov 2012-07-03 06:18:50 PDT
Inspector may take significant amount of memory when traversing DOM structure. Take it into account and report under inspector memory.
Comment 1 Alexei Filippov 2012-07-03 06:28:21 PDT
Created attachment 150596 [details]
Patch
Comment 2 Yury Semikhatsky 2012-07-03 06:43:02 PDT
Comment on attachment 150596 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=150596&action=review

> Source/WebCore/inspector/InspectorMemoryAgent.cpp:446
> +    return sizeof(ContainerType) + container.capacity() * sizeof(typename ContainerType::ValueType);

Please use the code for calculating container size from MemoryInstrumentation to avoid duplication, r- for this.

> Source/WebCore/inspector/InspectorMemoryAgent.cpp:614
> +    inspectorData.countSize(ScriptProfiler::profilerSnapshotsSize());

What about reporting profile and visited nodes map sizes as separate children of InspectorData block?
Comment 3 Alexei Filippov 2012-07-06 09:38:07 PDT
Created attachment 151091 [details]
Patch
Comment 4 Alexei Filippov 2012-07-06 09:38:49 PDT
Comment on attachment 150596 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=150596&action=review

>> Source/WebCore/inspector/InspectorMemoryAgent.cpp:446
>> +    return sizeof(ContainerType) + container.capacity() * sizeof(typename ContainerType::ValueType);
> 
> Please use the code for calculating container size from MemoryInstrumentation to avoid duplication, r- for this.

done

>> Source/WebCore/inspector/InspectorMemoryAgent.cpp:614
>> +    inspectorData.countSize(ScriptProfiler::profilerSnapshotsSize());
> 
> What about reporting profile and visited nodes map sizes as separate children of InspectorData block?

done
Comment 5 Pavel Feldman 2012-07-10 09:10:44 PDT
Comment on attachment 151091 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=151091&action=review

> Source/WebCore/inspector/InspectorMemoryAgent.cpp:646
> +    children->addItem(domTreeInfo(m_page, visitedObjects, &inspectorData)); // TODO: collect for all pages?

// FIXME:
Comment 6 WebKit Review Bot 2012-07-10 09:12:43 PDT
Comment on attachment 151091 [details]
Patch

Rejecting attachment 151091 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
e/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebCore/dom/MemoryInstrumentation.h
patching file Source/WebCore/inspector/InspectorMemoryAgent.cpp
Hunk #7 succeeded at 575 with fuzz 1.
Hunk #8 FAILED at 633.
1 out of 8 hunks FAILED -- saving rejects to file Source/WebCore/inspector/InspectorMemoryAgent.cpp.rej

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Pavel Feld..." exit_code: 1 cwd: /mnt/git/webkit-commit-queue/

Full output: http://queues.webkit.org/results/13204004
Comment 7 Alexei Filippov 2012-07-10 10:06:24 PDT
Created attachment 151476 [details]
Patch
Comment 8 Alexei Filippov 2012-07-10 10:07:11 PDT
Comment on attachment 151091 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=151091&action=review

also done rebaselining

>> Source/WebCore/inspector/InspectorMemoryAgent.cpp:646
>> +    children->addItem(domTreeInfo(m_page, visitedObjects, &inspectorData)); // TODO: collect for all pages?
> 
> // FIXME:

done
Comment 9 WebKit Review Bot 2012-07-10 12:10:58 PDT
Comment on attachment 151476 [details]
Patch

Clearing flags on attachment: 151476

Committed r122243: <http://trac.webkit.org/changeset/122243>
Comment 10 WebKit Review Bot 2012-07-10 12:11:04 PDT
All reviewed patches have been landed.  Closing bug.