Commit ff37ef0d authored by Jon Coppeard's avatar Jon Coppeard
Browse files

Bug 1832937 - Always track nursery string allocations in compiled code r=jandem

When I consolidated the allocation counts I forgot that we always track nursery
string allocations in optimised code as this feeds into the decision to disable
nursery string allocation. This is important for benchmarks like splay which
allocate a lot of long-lived strings.

Differential Revision: https://phabricator.services.mozilla.com/D178456
parent bb1dbfa4
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -601,9 +601,12 @@ void MacroAssembler::bumpPointerAllocate(Register result, Register temp,
    storePtr(ImmWord(headerWord),
             Address(result, -js::Nursery::nurseryCellHeaderSize()));

    // Only update the catch all allocation site if the profiler is
    // enabled. This is used to calculate the nursery allocation count.
    if (runtime()->geckoProfiler().enabled()) {
    // Update the catch all allocation site for strings or if the profiler is
    // enabled. This is used to calculate the nursery allocation count. The
    // string data is used to determine whether to disable nursery string
    // allocation.
    if (traceKind == JS::TraceKind::String ||
        runtime()->geckoProfiler().enabled()) {
      uint32_t* countAddress = site->nurseryAllocCountAddress();
      CheckedInt<int32_t> counterOffset =
          (CheckedInt<uintptr_t>(uintptr_t(countAddress)) -