Open Bug 1846263 Opened 3 years ago Updated 3 years ago

Compiler inlining can have a large effect on marking performance

Categories

(Core :: JavaScript: GC, task, P3)

Unspecified
Linux
task

Tracking

()

People

(Reporter: jonco, Unassigned)

References

(Blocks 1 open bug)

Details

Something I noticed while working on parallel marking was that it seemed to be faster than standard marking on microbenchmarks by up to 10% even when only using a single thread.

This turned out to be because the compiler was inlining the parallel and non-parallel paths in different ways. I believe most of the difference comes from whether GCMarker::processMarkStackTop is inlined in the loop that calls it.

Outside microbenchmarks this effect is worth 3% on splay and splay latency so it would be great if we could make the compiler do this reliably.

I tried using complier hints to control the inlining but it turns out that the compiler can ignore both MOZ_ALWAYS_INLINE and MOZ_NEVER_INLINE in release builds.

Filing this to record the issue. I don't know what to do about it.

This was on Linux. The effect was not present on macOS.

OS: Unspecified → Linux
Severity: -- → N/A
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.