Closed Bug 538450 Opened 15 years ago Closed 3 years ago

Make string atomization not require taking a runtime lock?

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: Waldo, Assigned: arai)

References

Details

Attachments

(9 files)

Conceptually, it seems like it should be feasible to use a threadsafe hashtable to store atomized strings, where the pattern of js_AtomizeString would be probe, return if non-null, create the atomized string, insert with compare-and-swap with null and the atomized string, then return either the atomized string if the hash entry was changed from null or the existing atomization if the hash entry wasn't null. Is it actually feasible? Dunno, worth filing in any case.
Assignee: general → nobody
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED

once bug 1687973 is fixed, atomization doesn't happen off-main thread, and we don't need lock.

Bug 1687973 removed the remaining consumer of related methods.

  • GCRuntime::setParallelAtomsAllocEnabled is removed in Part 2
  • JSRuntime::numActiveHelperThreadZones is removed in Part 2
  • GCRuntime::triggerFullGCForAtoms is removed in Part 6
  • GlobalObject::OffThreadPlaceholderObject is removed in bug 1587847
  • GlobalObject::resolveOffThreadConstructor is removed in bug 1587847

Depends on D131362

  • AtomsTable::AutoLock is removed in Part 3
    • AutoLockAllAtoms is removed in Part 3
    • GCRuntime::fullGCForAtomsRequested_ is removed in Part 6
    • Zone::canCollect is removed in Part 7

Depends on D131363

  • AutoAccessAtomsZone is removed in Part 9

Depends on D131364

Depends on D131365

Depends on D131367

Depends on D131368

Depends on D131369

Depends on D131370

Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/cec294c924b8 Part 1: Remove Zone::{helperThreadUse_,helperThreadOwnerContext_}. r=jonco https://hg.mozilla.org/integration/autoland/rev/b1a0f88e06f8 Part 2: Remove JSRuntime::numActiveHelperThreadZones. r=jonco https://hg.mozilla.org/integration/autoland/rev/c4eee84a4ec4 Part 3: Remove atom lock. r=jonco https://hg.mozilla.org/integration/autoland/rev/1e8458783db9 Part 4: Remove JSRuntime::offThreadParsesRunning_. r=jonco https://hg.mozilla.org/integration/autoland/rev/9d22dbb6fc6c Part 5: Remove JSRuntime::offThreadParsingBlocked_. r=jonco https://hg.mozilla.org/integration/autoland/rev/c7c122e97b0e Part 6: Remove GCRuntime::triggerFullGCForAtoms. r=jonco https://hg.mozilla.org/integration/autoland/rev/33e7c7c5d412 Part 7: Remove Zone::canCollect. r=jonco https://hg.mozilla.org/integration/autoland/rev/9d74ee42084a Part 8: Remove ZoneGCStats::collectableZoneCount. r=jonco https://hg.mozilla.org/integration/autoland/rev/d48623c86ece Part 9: Remove AutoAccessAtomsZone. r=jonco
Blocks: 1721120
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: