Bug 158999 - Options::useImmortalObjects is not safe for conservative GC
Summary: Options::useImmortalObjects is not safe for conservative GC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-21 14:52 PDT by Geoffrey Garen
Modified: 2016-06-21 16:06 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.56 KB, patch)
2016-06-21 15:07 PDT, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch (5.30 KB, patch)
2016-06-21 15:19 PDT, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch for landing (5.46 KB, patch)
2016-06-21 15:32 PDT, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch for landing (5.47 KB, patch)
2016-06-21 15:33 PDT, Geoffrey Garen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2016-06-21 14:52:00 PDT
Options::useImmortalObjects is not safe for conservative GC
Comment 1 Geoffrey Garen 2016-06-21 15:07:29 PDT
Created attachment 281784 [details]
Patch
Comment 2 Michael Saboff 2016-06-21 15:09:12 PDT
Comment on attachment 281784 [details]
Patch

r=me
Comment 3 Joseph Pecoraro 2016-06-21 15:14:35 PDT
Comment on attachment 281784 [details]
Patch

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

> Source/JavaScriptCore/heap/Heap.cpp:-1476
> -    if (Options::useImmortalObjects())
> -        markDeadObjects();

This is the only use of Options::useImmortalObjects. Should we remove the Option, or should we leave in legacy options even if they do nothing?
Comment 4 Joseph Pecoraro 2016-06-21 15:14:56 PDT
Comment on attachment 281784 [details]
Patch

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

> Source/JavaScriptCore/heap/MarkedAllocator.cpp:74
> +        bool isImmortal = block->state() != MarkedBlock::New && Options::useImmortalObjects();

I see it is now used here! Nevermind =)
Comment 5 Geoffrey Garen 2016-06-21 15:19:55 PDT
Created attachment 281786 [details]
Patch
Comment 6 Michael Saboff 2016-06-21 15:21:04 PDT
Comment on attachment 281786 [details]
Patch

LGTM
Comment 7 Mark Lam 2016-06-21 15:25:40 PDT
Comment on attachment 281786 [details]
Patch

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

> Source/JavaScriptCore/heap/MarkedAllocator.cpp:225
> +    if (Options::useImmortalObjects()) {

Make this UNLIKELY(Options::useImmortalObjects())?
Comment 8 Geoffrey Garen 2016-06-21 15:32:29 PDT
Created attachment 281788 [details]
Patch for landing
Comment 9 Geoffrey Garen 2016-06-21 15:33:51 PDT
Created attachment 281789 [details]
Patch for landing
Comment 10 WebKit Commit Bot 2016-06-21 16:06:18 PDT
Comment on attachment 281789 [details]
Patch for landing

Clearing flags on attachment: 281789

Committed r202299: <http://trac.webkit.org/changeset/202299>
Comment 11 WebKit Commit Bot 2016-06-21 16:06:22 PDT
All reviewed patches have been landed.  Closing bug.