Closed Bug 1873129 Opened 1 year ago Closed 1 year ago

7.2% regression on AWFY-Jetstream2-OfflineAssembler-Average around 2Jan2024

Categories

(Core :: Performance: General, defect, P3)

defect

Tracking

()

RESOLVED INVALID
Tracking Status
firefox123 --- affected

People

(Reporter: mayankleoboy1, Unassigned)

Details

(Keywords: regression)

Comparing profiles with the optimization enabled/disabled, the main difference seems to be a significant increase in the number of samples in TenuringTracer::relocateDependentStringChars -> HeaderWord::isForwarded, from ~40000 (23%) -> ~60000 (30%). So it's not that we're wasting time atomizing eagerly, it's that somehow we've increased GC overhead. I'm not sure how to interpret that.

The hottest function where the optimization kicks in is parseExpressionAtom, which appears to inline a call to isInstruction, which calls Set.has. As far as I can tell, the input strings are all taken from the tokens array, which is populated in lex using strings returned from a regex. So we have an array of objects containing dependent strings, we atomize those strings because we're using them as keys into a Set, and (because of the new optimization) we update the objects to point to the atom instead of the dependent string.

Somehow, this causes problems. I'm not entirely sure how. It is maybe relevant that we're once again looking at tenuring dependent strings; I think that's appeared as a problem before.

On net I think this optimization is still good, but I'll keep this open for now in case we come up with a way to improve things.

Severity: -- → S3
Priority: -- → P3

This bug has been marked as a regression. Setting status flag for Nightly to affected.

:iain will this be marked as wontfix for 123? You noted in comment 1 that this should be left open - is more investigation needed to understand why a regression was caused despite improvements in other areas?

Flags: needinfo?(iireland)

I circled back on this to upload some profiles for the GC team, but I couldn't reproduce the regression locally. Looking more closely at the perfherder graph: isn't this actually an improvement? Higher is better on this graph, and we seem to have gone from a score of ~51 to a score of ~55.

I have no idea what I was seeing in my earlier profiles. Maybe I just happened to catch a particularly slow run? I remember thinking that I had reproduced the regression locally, but maybe I made the same mistake of thinking lower numbers were better.

Status: NEW → RESOLVED
Closed: 1 year ago
Flags: needinfo?(iireland)
Resolution: --- → INVALID

(In reply to Iain Ireland [:iain] from comment #4)

I circled back on this to upload some profiles for the GC team, but I couldn't reproduce the regression locally. Looking more closely at the perfherder graph: isn't this actually an improvement? Higher is better on this graph, and we seem to have gone from a score of ~51 to a score of ~55.

You are right, this is an improvement. Not sure why i thought this was a regression.

Well, I'm glad we noticed the improvement.

You need to log in before you can comment on or make changes to this bug.