Closed Bug 1590641 Opened 5 years ago Closed 5 years ago

Improve the byteSize-of-string.js test

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

Noticed while updating it for bug 1330776:

  • It claims external strings can't be created in the shell, but we have newExternalString now. We would also need to implement the externalStringSizeofCallback - a bit annoying because it means NewExternalString has to move from TestingFunctions.cpp to shell/js.cpp Or maybe better: the sizeOf function could be grouped with the finalization callback in a static struct so we can have multiple external-size-of implementations.
  • The use of "extensible strings" is wrong, this string for example isn't extensible, it's just a plain JSLinearString.

(In reply to Jan de Mooij [:jandem] from comment #0)

  • The use of "extensible strings" is wrong, this string for example isn't extensible, it's just a plain JSLinearString.

Oh never mind this, I think I was misreading the test.

Priority: -- → P3
Depends on: 1590776

Bug 1590776 fixed memory reporting for external strings allocated by the
newExternalString testing function so we can now add some tests.

Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/26eaf3f0479b
Test external string sizes in byteSize-of-string.js. r=jwalden

Fun, on Windows the smallest malloc bucket size is 8 bytes (on 32-bit) and 16 bytes (on 64-bit) instead of 4 and 8 bytes on other platforms...

https://searchfox.org/mozilla-central/rev/74cc0f4dce444fe0757e2a6b8307d19e4d0e0212/memory/build/mozjemalloc.cpp#384-385

Thanks, Jan!

Flags: needinfo?(jdemooij)
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/21014b340630
Test external string sizes in byteSize-of-string.js. r=jwalden
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: