As previously discussed, default block placement for ubsan handler
blocks (when recoverable) are suboptimal and cause poor icache
performance.
Attached is a simple patch adding strong branch hints to ensure proper
block placement.
Also, I've attached an extended version of the previous set of
experiments that includes results for this change vs without this
change, as well as the similarly isolated impact of using the ColdCC
change.
In summary, this minor change brings overall slowdown from 34% to 23%,
and relative to NoRecover from 20% to 10%.
Easy win :).
Ok to commit?
~Will
0001-ubsan-Emit-branch-weight-metadata-to-hint-towards-co.patch (1.25 KB)
recover.pdf (7.77 KB)