The interpreter can execute slowly when looking-up counters to be incremented for code coverage. For this reason, we separated collectCoverage from collectCoverageFromDebug. In Bug 1394761, a profile show that we do execute the code coverage code under the interpreter. One possibility, is that the code was once hot enough to create the script counts structure, by getting compiled in Baseline, and later went unused for a while (2 GC ?), which removed the BaselineScript, leaving the function to be executed in the Interpreter again. If we are not collecting code coverage information for debug reasons, we should trash the counters at the same time as BaselineScripts, under jit::FinishDiscardBaselineScript.
Bug 1437978 reported that this consumed a bit more than 1 MB on Talos. We should ensure that we do trash them properly when we trash Baseline code (/ relazify).
You need to log in before you can comment on or make changes to this bug.