Closed Bug 1881888 Opened 2 years ago Closed 8 months ago

Remove support for JSMs

Categories

(Core :: XPConnect, task)

task

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Blocks 1 open bug)

Details

(Keywords: perf-alert)

Attachments

(13 files, 2 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Once all m-c, c-c, and out-of-tree migrate to ESM, we can remove JSMs.
We're planning to finish the m-c/c-c migration before ESR128, and let out-of-tree code migrate in the ESR128 cycle, and remove JSM support after that.

Depends on: 1936092
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Duplicate of this bug: 1776175

The patch is almost working,
https://treeherder.mozilla.org/jobs?repo=try&revision=0019c3520e498278a96bcc197f8cea9aeebb2bc4&group_state=expanded

except for that there's one test failing
https://treeherder.mozilla.org/jobs?repo=try&revision=0019c3520e498278a96bcc197f8cea9aeebb2bc4&group_state=expanded&selectedTaskRun=Fwdqg4ItTQaNrWJefJgYJw.0

The issue comes from the patch that unsets the JS::TransitiveCompileOptions.deoptimizeModuleGlobalVars option.
For some reason, the following assertion fails after the change.
The assertion doesn't look actually related to the option (the option marks all top-level variables closed over, that results in putting all variables in the module environment object. this difference shouldn't be visible to regular JS execution, except for slight performance regression).

https://searchfox.org/mozilla-central/rev/f53c09a22edc700ab1a9eaaf4da0f0dd9f11bff3/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadLastDir_toggle.js#43-45

gDownloadLastDir.file = tmpDir;
clearHistory();
is(gDownloadLastDir.file, null, "gDownloadLastDir.file should be null");

The issue is intermittent locally, so it may take some more time to investigate.

Depends on: 1940463
Depends on: 1940741

Comment on attachment 9446068 [details]
Bug 1881888 - Remove XPCOMUtils.defineLazyModuleGetters. r?mccr8!

Revision D233379 was moved to bug 1940741. Setting attachment 9446068 [details] to obsolete.

Attachment #9446068 - Attachment is obsolete: true

The SkipCheckForBrokenURLOrZeroSized flag is introduced by bug 1777641
in order to suppress the assertion while trying to read possibly-non-existent
.jsm url before falling back to the .sys.mjs url.
The fallback is removed and the flag can be removed.

See Also: → 1941472
Attachment #9446631 - Attachment description: Bug 1881888 - Part 14: Remove unused macro. r?jonco! → Bug 1881888 - Part 13: Remove unused macro. r?jonco!

Comment on attachment 9446630 [details]
Bug 1881888 - Part 13: Stop setting JS::TransitiveCompileOptions.deoptimizeModuleGlobalVars. r?jonco!

Revision D233725 was moved to bug 1941472. Setting attachment 9446630 [details] to obsolete.

Attachment #9446630 - Attachment is obsolete: true
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/c05980728114 Part 1: Remove JSM to ESM shim for ChromeUtils.import. r=jonco https://hg.mozilla.org/integration/autoland/rev/2d16015a602d Part 2: Remove SkipCheckForBrokenURLOrZeroSized. r=jonco,necko-reviewers,valentin https://hg.mozilla.org/integration/autoland/rev/d967e266d38c Part 3: Remove JSM to ESM shim for Cu.isModuleLoaded. r=jonco https://hg.mozilla.org/integration/autoland/rev/fb54d847ce61 Part 4: Remove JSM to ESM shim for Cu.loadedModules. r=jonco https://hg.mozilla.org/integration/autoland/rev/afd8f6f2321b Part 5: Remove Cu.{isModuleLoaded,isJSModuleLoaded}. r=mccr8 https://hg.mozilla.org/integration/autoland/rev/5b7316fc7e81 Part 6: Remove Cu.{loadedModules,loadedJSModules}. r=mccr8 https://hg.mozilla.org/integration/autoland/rev/2a5e5d81b362 Part 7: Remove Cu.unload. r=mccr8 https://hg.mozilla.org/integration/autoland/rev/c16f489a3f80 Part 8: Remove Cu.import. r=mccr8,profiler-reviewers,julienw https://hg.mozilla.org/integration/autoland/rev/e65703b070ff Part 9: Remove ChromeUtils.defineModuleGetter. r=Standard8,mccr8,profiler-reviewers,omc-reviewers,home-newtab-reviewers,julienw,mconley,pdahiya https://hg.mozilla.org/integration/autoland/rev/e623df981bc9 Part 10: Remove ChromeUtils.import. r=Standard8,mccr8,profiler-reviewers,omc-reviewers,home-newtab-reviewers,julienw,mconley,pdahiya https://hg.mozilla.org/integration/autoland/rev/b6642abc8157 Part 11: Remove nsIMemoryReporter interface from mozJSModuleLoader. r=mccr8 https://hg.mozilla.org/integration/autoland/rev/ce9c5f1e511b Part 12: Remove ModuleLoaderInfo::Key. r=mccr8 https://hg.mozilla.org/integration/autoland/rev/2c7092313122 Part 13: Remove unused macro. r=jonco
Blocks: 1758481

(In reply to Pulsebot from comment #20)

Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/c05980728114
Part 1: Remove JSM to ESM shim for ChromeUtils.import. r=jonco
https://hg.mozilla.org/integration/autoland/rev/2d16015a602d
Part 2: Remove SkipCheckForBrokenURLOrZeroSized.
r=jonco,necko-reviewers,valentin
https://hg.mozilla.org/integration/autoland/rev/d967e266d38c
Part 3: Remove JSM to ESM shim for Cu.isModuleLoaded. r=jonco
https://hg.mozilla.org/integration/autoland/rev/fb54d847ce61
Part 4: Remove JSM to ESM shim for Cu.loadedModules. r=jonco
https://hg.mozilla.org/integration/autoland/rev/afd8f6f2321b
Part 5: Remove Cu.{isModuleLoaded,isJSModuleLoaded}. r=mccr8
https://hg.mozilla.org/integration/autoland/rev/5b7316fc7e81
Part 6: Remove Cu.{loadedModules,loadedJSModules}. r=mccr8
https://hg.mozilla.org/integration/autoland/rev/2a5e5d81b362
Part 7: Remove Cu.unload. r=mccr8
https://hg.mozilla.org/integration/autoland/rev/c16f489a3f80
Part 8: Remove Cu.import. r=mccr8,profiler-reviewers,julienw
https://hg.mozilla.org/integration/autoland/rev/e65703b070ff
Part 9: Remove ChromeUtils.defineModuleGetter.
r=Standard8,mccr8,profiler-reviewers,omc-reviewers,home-newtab-reviewers,
julienw,mconley,pdahiya
https://hg.mozilla.org/integration/autoland/rev/e623df981bc9
Part 10: Remove ChromeUtils.import.
r=Standard8,mccr8,profiler-reviewers,omc-reviewers,home-newtab-reviewers,
julienw,mconley,pdahiya
https://hg.mozilla.org/integration/autoland/rev/b6642abc8157
Part 11: Remove nsIMemoryReporter interface from mozJSModuleLoader. r=mccr8
https://hg.mozilla.org/integration/autoland/rev/ce9c5f1e511b
Part 12: Remove ModuleLoaderInfo::Key. r=mccr8
https://hg.mozilla.org/integration/autoland/rev/2c7092313122
Part 13: Remove unused macro. r=jonco

Perfherder has detected a awsy performance change from push 2c7092313122c684fcdeb6fcf451248ee8645616.

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
0.34% Base Content JS windows11-64-2009-shippable-qr fission 1,545,552.00 -> 1,540,266.00
0.33% Base Content JS linux1804-64-shippable-qr fission 1,539,113.00 -> 1,533,964.00

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.

You can run these tests on try with ./mach try perf --alert 43462

For more information on performance sheriffing please see our FAQ.

Keywords: perf-alert

Maybe the memory wins here are enough to offset the regression in bug 1939273?

Sure, but the situation in bug 1939273 seems to be something we want to address in anyway.
(The extra text affected there doesn't sound reasonable to be in the final binary)

To be clear, I'm not going to backout the entire patch stack just for bug 1939273.

Regressions: 1952701
See Also: → 1921344
See Also: → 1921346
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: