WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
146874
Watchpoints should be allocated with FastMalloc
https://bugs.webkit.org/show_bug.cgi?id=146874
Summary
Watchpoints should be allocated with FastMalloc
Filip Pizlo
Reported
2015-07-10 22:46:39 PDT
Previously we had some cruft about allocating some kinds of Watchpoints in SegmentedVectors. That's pretty sad. Also, it appears that some of the watchpoints are allocated with normal malloc. Also sad.
Attachments
the patch
(4.32 KB, patch)
2015-07-10 22:49 PDT
,
Filip Pizlo
mitz: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2015-07-10 22:49:21 PDT
Created
attachment 256645
[details]
the patch
Filip Pizlo
Comment 2
2015-07-10 22:51:09 PDT
Comment on
attachment 256645
[details]
the patch View in context:
https://bugs.webkit.org/attachment.cgi?id=256645&action=review
> Source/JavaScriptCore/bytecode/CodeBlockJettisoningWatchpoint.h:2 > - * Copyright (C) 2013 Apple Inc. All rights reserved. > + * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
Oops, I'll revert. I just deleted code.
Filip Pizlo
Comment 3
2015-07-10 22:54:24 PDT
Landed in
http://trac.webkit.org/changeset/186705
Darin Adler
Comment 4
2015-07-11 15:30:19 PDT
Comment on
attachment 256645
[details]
the patch View in context:
https://bugs.webkit.org/attachment.cgi?id=256645&action=review
> Source/JavaScriptCore/dfg/DFGDesiredWatchpoints.h:95 > typename HashSet<WatchpointSetType*>::iterator iter = m_sets.begin(); > typename HashSet<WatchpointSetType*>::iterator end = m_sets.end(); > - for (; iter != end; ++iter) { > - common.watchpoints.append(CodeBlockJettisoningWatchpoint(codeBlock)); > - Adaptor::add(codeBlock, *iter, &common.watchpoints.last()); > - } > + for (; iter != end; ++iter) > + Adaptor::add(codeBlock, *iter, common.watchpoints.add(codeBlock));
Here’s another way to write this: for (auto* set : m_sets) Adaptor::add(codeBlock, set, common.watchpoints.add(codeBlock)); I think the modern for loop makes this code look clearer.
Darin Adler
Comment 5
2015-07-11 15:30:57 PDT
Comment on
attachment 256645
[details]
the patch View in context:
https://bugs.webkit.org/attachment.cgi?id=256645&action=review
>> Source/JavaScriptCore/dfg/DFGDesiredWatchpoints.h:95 >> + Adaptor::add(codeBlock, *iter, common.watchpoints.add(codeBlock)); > > Here’s another way to write this: > > for (auto* set : m_sets) > Adaptor::add(codeBlock, set, common.watchpoints.add(codeBlock)); > > I think the modern for loop makes this code look clearer.
Just noticed you did a variation on that in your very next patch. Never mind!
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