DescriptionEnable CFI for virtual calls on Linux x86-64 official builds.
This is the second incremental step towards the full CFI launch.
In the first step, we enabled LinkTimeOptimization (LTO) for the
official Chrome builds, which allowed us to devirtualize
51491 site calls pointing to 23149 virtual methods:
https://storage.googleapis.com/cfi-stats/2016-08-15/devirt-methods.html
That sped up a few layout benchmarks by up to 7%
(see https://crbug.com/580389 and https://crbug.com/617283) and
more by 2%-3%.
In the current step, we add Control Flow Integrity checks for
virtual calls. As of now, some functions are excluded from CFI for
performance reasons by either tools/cfi/blacklist.txt or
DISABLE_CFI_PERF attribute.
Once we have proven that there're no perf regressions, we'll be
working on the compiler optimizations to allow reenabling CFI
on the currently suppressed functions.
The remaining part would be to add bad-cast checks to ensure the
forward-edge Control Flow Integrity works as planned. That will
require more work on reducing the overhead for size and speed by these
CFI checks, so we don't enable them right away.
The expected Perf impact by this CL:
- Chrome binary size is increased by 5%,
- Some of the benchmarks are slowed down by up to 3%.
If we see any slowdown, the regressed microbenchmarks will be profiled,
and a few top methods will have CFI disabled on them. This is
the safety valve we intend to use until Clang is ready to generate
more efficient code in these cases.
BUG=464797
Committed: https://crrev.com/e4f3427521c7d96fb1772bd74c7938e39346d280
Cr-Commit-Position: refs/heads/master@{#413252}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Revert gyp #
Messages
Total messages: 18 (10 generated)
|