Closed Bug 1037886 Opened 5 years ago Closed 5 years ago

Report Latin1 and TwoByte strings separately in about:memory

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: jandem, Assigned: jandem)

References

Details

(Whiteboard: [MemShrink])

Attachments

(1 file)

Attached patch WIPSplinter Review
I'm attaching a WIP patch to report Latin1 vs TwoByte chars separately.

I opened Gmail and TBPL and, as expected, most strings are Latin1, but some (similar-looking) long strings in the "notable strings" category are stored as TwoByte but only contain Latin1 chars.

There are some places (IndexToString, fun.toString(), external strings etc) where we still create TwoByte strings and if we then concatenate we can easily end up with many other TwoByte strings.

Will look into this more next week; there should be some low-hanging fruit.
Whiteboard: [MemShrink]
Comment on attachment 8454927 [details] [diff] [review]
WIP

Review of attachment 8454927 [details] [diff] [review]:
-----------------------------------------------------------------

njn, what do you think?
Attachment #8454927 - Flags: review?(n.nethercote)
Comment on attachment 8454927 [details] [diff] [review]
WIP

Review of attachment 8454927 [details] [diff] [review]:
-----------------------------------------------------------------

Very simple. Looks good, thanks.
Attachment #8454927 - Flags: review?(n.nethercote) → review+
No longer depends on: 1039611
https://hg.mozilla.org/mozilla-central/rev/beb84b882a68
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.