WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
38420
Web Inspector: JSC should provide heap size info for Timeline panel
https://bugs.webkit.org/show_bug.cgi?id=38420
Summary
Web Inspector: JSC should provide heap size info for Timeline panel
Ilya Tikhonovsky
Reported
2010-05-01 03:38:24 PDT
%SUBJ%
Attachments
[patch] initial version.
(11.83 KB, patch)
2010-05-14 06:06 PDT
,
Ilya Tikhonovsky
no flags
Details
Formatted Diff
Diff
[patch] second iteration. With fixed case of JSDOMWindow.h
(11.83 KB, patch)
2010-05-14 07:37 PDT
,
Ilya Tikhonovsky
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Feldman
Comment 1
2010-05-12 23:46:04 PDT
Can we do something like this as a short term solution? JSGlobalData* globalData = JSDOMWindow::commonJSGlobalData(); Statistics statistics = globalData->heap.statistics(); Use statistics.size & statistics.free? It'll traverse heap, but is there anything that works faster for you guys?
Geoffrey Garen
Comment 2
2010-05-13 10:28:45 PDT
I think it's better not to traverse the heap. In the worst case, the heap traversal can be more expensive than the page load itself, so there's a big risk of measurement overhead ruining the timeline. How about just using m_heap.usedBlocks * BLOCK_SIZE? That's a constant-time measurement of the size of the heap, which should be good enough for general measurement. (statistics() goes farther and gets exact counts of what's live and dead, but that's really only useful for debugging memory leaks in WebKit.) There's no current accessor for m_heap.usedBlocks * BLOCK_SIZE, but it would be trivial to add one. size_t Heap::size() // In bytes. { return m_heap.usedBlocks * BLOCK_SIZE; }
Ilya Tikhonovsky
Comment 3
2010-05-14 06:06:41 PDT
Created
attachment 56064
[details]
[patch] initial version. I've made recommended implementation. But from the other hand I've made some investigation and found that the heap traversing is eating not more than 0.1 ms for 60mb heap.
WebKit Review Bot
Comment 4
2010-05-14 07:16:38 PDT
Attachment 56064
[details]
did not build on gtk: Build output:
http://webkit-commit-queue.appspot.com/results/2282074
Ilya Tikhonovsky
Comment 5
2010-05-14 07:37:00 PDT
Created
attachment 56068
[details]
[patch] second iteration. With fixed case of JSDOMWindow.h
Geoffrey Garen
Comment 6
2010-05-14 09:53:05 PDT
Comment on
attachment 56068
[details]
[patch] second iteration. With fixed case of JSDOMWindow.h r=me That .1ms number is interesting. Perhaps we should reconsider the heap traversal option if there's a big benefit in terms of WebInspector UI.
WebKit Commit Bot
Comment 7
2010-05-15 01:46:34 PDT
Comment on
attachment 56068
[details]
[patch] second iteration. With fixed case of JSDOMWindow.h Clearing flags on attachment: 56068 Committed
r59526
: <
http://trac.webkit.org/changeset/59526
>
WebKit Commit Bot
Comment 8
2010-05-15 01:46:40 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug