WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
144011
Give the heap object iterators the ability to return early.
https://bugs.webkit.org/show_bug.cgi?id=144011
Summary
Give the heap object iterators the ability to return early.
Mark Lam
Reported
2015-04-21 14:15:42 PDT
JSDollarVMPrototype::isValidCell() uses a heap object iterator to validate candidate cell pointers, and, when in use, is called a lot more often than the normal way those iterators are used. As a result, I see my instrumented VM killed with a SIGXCPU (CPU time limit exceeded). This patch gives the callback functor the ability to tell the iterators to return early when the functor no longer needs to continue iterating. With this, my instrumented VM is useful again for debugging. Since heap iteration is not something that we do in a typical fast path, I don’t expect this to have any noticeable impact on performance.
Attachments
the patch.
(17.45 KB, patch)
2015-04-21 14:21 PDT
,
Mark Lam
ggaren
: review-
Details
Formatted Diff
Diff
patch 2: no more comments.
(28.03 KB, patch)
2015-04-21 17:21 PDT
,
Mark Lam
msaboff
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Mark Lam
Comment 1
2015-04-21 14:21:00 PDT
Created
attachment 251261
[details]
the patch.
Geoffrey Garen
Comment 2
2015-04-21 16:05:23 PDT
Comment on
attachment 251261
[details]
the patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=251261&action=review
> Source/JavaScriptCore/heap/Heap.cpp:1453 > + return false; // Not done iterating.
If an API requires a comment at every usage site, that's a good sign that the API is not readable by design.
Mark Lam
Comment 3
2015-04-21 16:06:24 PDT
(In reply to
comment #2
)
> Comment on
attachment 251261
[details]
> the patch. > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=251261&action=review
> > > Source/JavaScriptCore/heap/Heap.cpp:1453 > > + return false; // Not done iterating. > > If an API requires a comment at every usage site, that's a good sign that > the API is not readable by design.
I'm open to suggestions.
Michael Saboff
Comment 4
2015-04-21 16:07:22 PDT
Comment on
attachment 251261
[details]
the patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=251261&action=review
>>> Source/JavaScriptCore/heap/Heap.cpp:1453 >>> + return false; // Not done iterating. >> >> If an API requires a comment at every usage site, that's a good sign that the API is not readable by design. > > I'm open to suggestions.
Make it an enum.
Mark Lam
Comment 5
2015-04-21 16:11:37 PDT
(In reply to
comment #4
)
> Comment on
attachment 251261
[details]
> the patch. > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=251261&action=review
> > >>> Source/JavaScriptCore/heap/Heap.cpp:1453 > >>> + return false; // Not done iterating. > >> > >> If an API requires a comment at every usage site, that's a good sign that the API is not readable by design. > > > > I'm open to suggestions. > > Make it an enum.
Sounds like a good plan. I will execute.
Mark Lam
Comment 6
2015-04-21 17:21:29 PDT
Created
attachment 251276
[details]
patch 2: no more comments.
Mark Lam
Comment 7
2015-04-21 17:23:50 PDT
Comment on
attachment 251276
[details]
patch 2: no more comments. View in context:
https://bugs.webkit.org/attachment.cgi?id=251276&action=review
> Source/JavaScriptCore/ChangeLog:17 > + I donât expect this to have any noticeable impact on performance.
Will fix the apostrophe in “don’t” before I land.
Michael Saboff
Comment 8
2015-04-22 12:43:28 PDT
Comment on
attachment 251276
[details]
patch 2: no more comments. r=me
Mark Lam
Comment 9
2015-04-22 13:07:05 PDT
Thanks for the review. Landed in
r183124
: <
http://trac.webkit.org/r183124
>.
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