Skip to content

Detailed findjsobjects output #149

@mmarchini

Description

@mmarchini

I was looking at the mdb_v8 output, and they have quite a different output for this command. For example, instead of grouping objects only by type or by constructor name, they also use the object properties and array indexes to aggregate them. They also have three other columns (Representative Object, Number of Properties and list of Properties) in their output, which looks like this:

OBJECT #OBJECTS   #PROPS CONSTRUCTOR: PROPS
   │       │         │        │         │
   │       │         │        │         └───> The first few properties for those
   │       │         │        │               objects
   │       │         │        │
   │       │         │        └─────────────> Name of this type's constructor
   │       │         │
   │       │         └──────────────────────> Number of properties + array 
   │       │                                  indexes for those objects
   │       │                                  
   │       └────────────────────────────────> Number of instances
   │       
   └────────────────────────────────────────> Representative object (address to 
                                              one sample object from this group)
   
   

I developed a prototype for a detailed version of findjsobjects, which is available here (branch feature/findjsobjects-detailed-output) and can be used with v8 findjsobjects --detailed. There's also a demo on Asciinema.

In this prototype, I added three new columns (Representative Object, Number of Properties and Array Size), and added the first three properties to the objects group name (last column). Objects are grouped by constructor name + properties + array size.

If you're interested I can create a PR with those changes.
I'm also opened to suggestions on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions