I noticed this while I was debugging a pointer that wasn't being updated properly. I was logging every time my AutoGCRooter subclass's trace method was called and it was called tens of times for a single gc (I was using trc->runtime()->gc.gcNumber() to determine that it was the same gc). The test case I was debugging was js/src/jit-test/tests/debug/Memory-takeCensus-09.js and I was using zeal 14. The AutoGCRooter subclass was https://dxr.mozilla.org/mozilla-central/rev/0876695d1abdeb363a780bda8b6cc84f20ba51c9/js/src/vm/DebuggerMemory.cpp#656 I know AutoGCRooter is on its way out, being replaced with JS::Traceable and Rooted, but if we are unnecessarily tracing the same things multiple times, I figured y'all would want to investigate.
Thanks for the report! For a compacting GC we mark the roots once per zone we compact because there's no way of marking the roots in a particular zone only. This is not ideal, but also it's not the most costly part of compacting either.
You need to log in before you can comment on or make changes to this bug.