Bug 131246 - Enhanced GC logging
Summary: Enhanced GC logging
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-04 15:39 PDT by Mark Hahnenberg
Modified: 2014-04-05 13:08 PDT (History)
7 users (show)

See Also:


Attachments
Patch (39.97 KB, patch)
2014-04-04 16:12 PDT, Mark Hahnenberg
no flags Details | Formatted Diff | Diff
Patch (40.01 KB, patch)
2014-04-04 16:30 PDT, Mark Hahnenberg
no flags Details | Formatted Diff | Diff
fix ports (42.61 KB, patch)
2014-04-04 16:48 PDT, Mark Hahnenberg
no flags Details | Formatted Diff | Diff
fix ports (42.63 KB, patch)
2014-04-04 17:38 PDT, Mark Hahnenberg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2014-04-04 15:39:22 PDT
Getting data on the state of the JSC Heap at runtime is currently in a sad state. The OBJECT_MARK_LOGGING macro enables some basic GC logging, but it requires a full recompile to turn it on. It would be nice if we could runtime enable our GC logging infrastructure while incurring minimal cost when it is disabled. 

It would also be nice to get a complete view of the Heap. Currently OBJECT_MARK_LOGGING provides us with the discovered roots along with parent-child relationships as objects are scanned. However, once an object is scanned it will never be declared as the child of another object during that collection. This gives us a tree-like view of the Heap (i.e. each scanned node only reports having a single parent), where the actual Heap is an arbitrary graph.
Comment 1 Mark Hahnenberg 2014-04-04 16:12:45 PDT
Created attachment 228631 [details]
Patch
Comment 2 WebKit Commit Bot 2014-04-04 16:14:30 PDT
Attachment 228631 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/runtime/Options.h:307:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 1 in 18 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Mark Hahnenberg 2014-04-04 16:16:38 PDT
(In reply to comment #2)
> Attachment 228631 [details] did not pass style-queue:
> 
> 
> ERROR: Source/JavaScriptCore/runtime/Options.h:307:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
> Total errors found: 1 in 18 files
> 
> 
> If any of these errors are false positives, please file a bug against check-webkit-style.

This is a constraint of our Options work (e.g. see OptionRange/optionRangeType).
Comment 4 Mark Hahnenberg 2014-04-04 16:16:57 PDT
> This is a constraint of our Options work (e.g. see OptionRange/optionRangeType).

..of how our Options work...
Comment 5 Geoffrey Garen 2014-04-04 16:19:43 PDT
Comment on attachment 228631 [details]
Patch

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

r=me

> Source/JavaScriptCore/heap/GCLogging.cpp:106
> +    loggingFunctor.reviveCells();

If the revive call here is required in order to return the heap to a good state, then I think either LoggingFunctor::log() or LoggingFunctor::~LoggingFunctor() should do it automatically.
Comment 6 Mark Hahnenberg 2014-04-04 16:30:51 PDT
Created attachment 228632 [details]
Patch
Comment 7 WebKit Commit Bot 2014-04-04 16:33:48 PDT
Attachment 228632 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/runtime/Options.h:307:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 1 in 18 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Mark Hahnenberg 2014-04-04 16:48:42 PDT
Created attachment 228633 [details]
fix ports
Comment 9 WebKit Commit Bot 2014-04-04 16:50:58 PDT
Attachment 228633 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/runtime/Options.h:307:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 1 in 21 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 Mark Hahnenberg 2014-04-04 17:38:40 PDT
Created attachment 228637 [details]
fix ports
Comment 11 WebKit Commit Bot 2014-04-04 17:40:14 PDT
Attachment 228637 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/runtime/Options.h:307:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 1 in 21 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 12 Mark Hahnenberg 2014-04-05 13:05:37 PDT
Committed r166837: <http://trac.webkit.org/changeset/166837>
Comment 13 Mark Hahnenberg 2014-04-05 13:07:47 PDT
(In reply to comment #12)
> Committed r166837: <http://trac.webkit.org/changeset/166837>

Followup fix in http://trac.webkit.org/changeset/166838
Comment 14 Mark Hahnenberg 2014-04-05 13:08:09 PDT
Comment on attachment 228637 [details]
fix ports

Clearing review flag.