Bug 188157 - Add a debugging utility to dump the memory layout of a JSCell.
Summary: Add a debugging utility to dump the memory layout of a JSCell.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-07-30 00:15 PDT by Mark Lam
Modified: 2018-07-30 07:48 PDT (History)
9 users (show)

See Also:


Attachments
proposed patch. (12.77 KB, patch)
2018-07-30 00:34 PDT, Mark Lam
ysuzuki: review+
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2018-07-30 00:15:48 PDT
This is useful for some types of debugging work.
Comment 1 Mark Lam 2018-07-30 00:34:33 PDT
Created attachment 346053 [details]
proposed patch.
Comment 2 EWS Watchlist 2018-07-30 01:59:36 PDT
Comment on attachment 346053 [details]
proposed patch.

Attachment 346053 [details] did not pass jsc-ews (mac):
Output: https://webkit-queues.webkit.org/results/8697267

New failing tests:
stress/ftl-put-by-id-setter-exception-interesting-live-state.js.ftl-eager-no-cjit
apiTests
Comment 3 Yusuke Suzuki 2018-07-30 02:41:35 PDT
Comment on attachment 346053 [details]
proposed patch.

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

r=me

> Source/JavaScriptCore/ChangeLog:37
> +                structureID 369 0x171 structure 0x104b723e0
> +                indexingTypeAndMisc 11 0xb ArrayWithArrayStorage
> +                type 33 0x21

It would be nice if we can put classInfo's name too.
Comment 4 Mark Lam 2018-07-30 07:44:04 PDT
(In reply to Yusuke Suzuki from comment #3)
> Comment on attachment 346053 [details]
> proposed patch.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=346053&action=review
> 
> r=me

Thanks for the review.

> > Source/JavaScriptCore/ChangeLog:37
> > +                structureID 369 0x171 structure 0x104b723e0
> > +                indexingTypeAndMisc 11 0xb ArrayWithArrayStorage
> > +                type 33 0x21
> 
> It would be nice if we can put classInfo's name too.

We already do print the className e.g.
    <0x104bc8260, Object>
    <0x104bb4360, Array>
Comment 5 Mark Lam 2018-07-30 07:47:22 PDT
Landed in r234363: <http://trac.webkit.org/r234363>.
Comment 6 Radar WebKit Bug Importer 2018-07-30 07:48:25 PDT
<rdar://problem/42731814>