Bug 161751

Summary: Heap version should be 32-bit
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, keith_miller, mark.lam, msaboff, saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch mark.lam: review+

Filip Pizlo
Reported 2016-09-08 12:51:05 PDT
Patch forthcoming.
Attachments
the patch (13.49 KB, patch)
2016-09-08 12:53 PDT, Filip Pizlo
mark.lam: review+
Filip Pizlo
Comment 1 2016-09-08 12:53:14 PDT
Created attachment 288308 [details] the patch
WebKit Commit Bot
Comment 2 2016-09-08 12:55:02 PDT
Attachment 288308 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/heap/MarkedSpace.h:68: One space before end of line comments [whitespace/comments] [5] ERROR: Source/JavaScriptCore/heap/MarkedSpace.cpp:465: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5] ERROR: Source/JavaScriptCore/heap/ConservativeRoots.h:54: The parameter name "heapVersion" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/heap/CellContainer.h:76: The parameter name "heapVersion" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/heap/MarkedBlock.h:189: The parameter name "heapVersion" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/heap/MarkedBlock.h:190: The parameter name "heapVersion" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/heap/MarkedBlock.h:269: The parameter name "heapVersion" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/heap/MarkedBlock.h:270: The parameter name "heapVersion" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 8 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Mark Lam
Comment 3 2016-09-08 13:02:06 PDT
Comment on attachment 288308 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=288308&action=review r=me. Please fix the fixable style issues that the style checker complained about. > Source/JavaScriptCore/heap/MarkedBlock.h:323 > + Please remove leading empty space characters.
Filip Pizlo
Comment 4 2016-09-08 13:03:38 PDT
(In reply to comment #3) > Comment on attachment 288308 [details] > the patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=288308&action=review > > r=me. Please fix the fixable style issues that the style checker complained > about. OK > > > Source/JavaScriptCore/heap/MarkedBlock.h:323 > > + > > Please remove leading empty space characters. OK! Thanks for the review!
Filip Pizlo
Comment 5 2016-09-08 13:39:58 PDT
Geoffrey Garen
Comment 6 2016-09-08 21:26:48 PDT
Comment on attachment 288308 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=288308&action=review > Source/JavaScriptCore/heap/MarkedSpace.h:68 > + static const HeapVersion initialVersion = 42; // This can be any value, including random garbage, so long as it's consistent for the lifetime of the process. It's an interesting tidbit that any value can work, but I'm not sure it's necessary or desirable to take advantage. 0 is the best value to delay flipping for as long as possible, and it is also the least comment-worthy.
Filip Pizlo
Comment 7 2016-09-08 21:52:58 PDT
(In reply to comment #6) > Comment on attachment 288308 [details] > the patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=288308&action=review > > > Source/JavaScriptCore/heap/MarkedSpace.h:68 > > + static const HeapVersion initialVersion = 42; // This can be any value, including random garbage, so long as it's consistent for the lifetime of the process. > > It's an interesting tidbit that any value can work, but I'm not sure it's > necessary or desirable to take advantage. 0 is the best value to delay > flipping for as long as possible, and it is also the least comment-worthy. Wrap-around is not at zero. It's at the initial value. Therefore wrap-around happens after 2^32 flips, regardless of the initial value. That's sort of surprising, and I thought it deserved the comment. It's interesting that the comment fails to call out that it can be any value for not just correctness but performance, too.
Note You need to log in before you can comment on or make changes to this bug.