Open Bug 1814078 Opened 2 years ago Updated 2 years ago

Evaluate how many objects are effectively immutable

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

People

(Reporter: nbp, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Today, we have no idea what JavaScript code looks like, whether Objects which are instantiated are immutable or not. Before trying to categorize the kind of immutable objects, it might be good to have a rough estimate of how frequent are immutable objects.

Two ideas to measure that would be to either:

  • Add a read bit & mutation bit, where the read-bit is set once data are read from an object, and a write-bit is set if data is written to the object and the read-bit is set.
    [00]: never read object; [01]: immutable object; [11] mutable object
  • Use the Garbage Collector existing mechanics to generate a store-buffer / read-buffer, and collect these buffer in a file for post-processing offline. Allocation, moves would have to be tracked to avoid miss-counting around reused memory addresses.
Severity: -- → N/A
Priority: -- → P3
Depends on: 1816437
Whiteboard: [sp3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: