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
141097
GC marking threads should clear malloc caches
https://bugs.webkit.org/show_bug.cgi?id=141097
Summary
GC marking threads should clear malloc caches
Geoffrey Garen
Reported
2015-01-30 13:35:57 PST
GC marking threads should clear malloc caches
Attachments
Patch
(7.69 KB, patch)
2015-01-30 14:11 PST
,
Geoffrey Garen
no flags
Details
Formatted Diff
Diff
Patch
(1.90 KB, patch)
2015-01-30 16:27 PST
,
Geoffrey Garen
sam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Geoffrey Garen
Comment 1
2015-01-30 14:11:14 PST
Created
attachment 245740
[details]
Patch
Andreas Kling
Comment 2
2015-01-30 14:18:53 PST
Comment on
attachment 245740
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=245740&action=review
r=me
> Source/JavaScriptCore/ChangeLog:8 > + This is an attempt to amelirate a potential memory use regression
ameliorate
Geoffrey Garen
Comment 3
2015-01-30 14:22:52 PST
Committed
r179411
: <
http://trac.webkit.org/changeset/179411
>
Geoffrey Garen
Comment 4
2015-01-30 14:27:51 PST
Committed
r179412
: <
http://trac.webkit.org/changeset/179412
>
Mark Hahnenberg
Comment 5
2015-01-30 14:50:03 PST
Comment on
attachment 245740
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=245740&action=review
> Source/JavaScriptCore/heap/GCThread.cpp:79 > + WTF::releaseFastMallocFreeMemoryForThisThread();
I wonder if it makes more sense to do this at the end of collection rather than between phases? Seems a shame to clear out the per-thread malloc cache between marking and copying since copying might want to reuse some stuff from the marking phase.
Mark Hahnenberg
Comment 6
2015-01-30 14:54:11 PST
Also, maybe I dunno what scavenging is...
Geoffrey Garen
Comment 7
2015-01-30 15:47:39 PST
> I wonder if it makes more sense to do this at the end of collection rather > than between phases?
Yeah, end of collection is better. How to achieve? Maybe move the code to the end of the 'case Copy' block?
Mark Hahnenberg
Comment 8
2015-01-30 16:14:46 PST
Yeah that seems ok. There shouldn't be any parallel work left to do at the end of the CopyPhase, so that sounds like a good time to clear the malloc caches on those threads.
Mark Hahnenberg
Comment 9
2015-01-30 16:17:21 PST
Another idea might be to only clear the caches during collections caused by the GCTimer.
Geoffrey Garen
Comment 10
2015-01-30 16:27:53 PST
Reopening to attach new patch.
Geoffrey Garen
Comment 11
2015-01-30 16:27:54 PST
Created
attachment 245755
[details]
Patch
Geoffrey Garen
Comment 12
2015-01-30 16:29:17 PST
Committed
r179422
: <
http://trac.webkit.org/changeset/179422
>
Chris Dumez
Comment 13
2015-01-30 16:34:33 PST
Looks like some JSC tests are failing on the bots after this change?
https://build.webkit.org/builders/Apple%20Yosemite%20Debug%20WK2%20%28Tests%29/builds/1796/steps/jscore-test/logs/stdio
Chris Dumez
Comment 14
2015-01-30 16:35:52 PST
See also:
https://build.webkit.org/builders/Apple%20Mavericks%20LLINT%20CLoop%20%28BuildAndTest%29/builds/11932/steps/webkit-jsc-cloop-test/logs/stdio
Geoffrey Garen
Comment 15
2015-01-30 17:16:34 PST
Turned out to be a sporadic failure in that date test.
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