Disable -ftrivial-auto-var-init=pattern on performance critical code
STACK_UNINITIALIZED is __attribute__((uninitialized)) and it disables -ftrivial-auto-var-init=pattern on a particular variable. -ftrivial-auto-var-init=pattern inserts initialization of all local variables including those which are not required by language standard. Additional initialization usually can be optimized out by compiled, however in cases when code is too complicated for optimizer we can see performance regression. To avoid that we need either to rewrite code or just disabled initialization with the attribute. Particularly here I don't see a reasonable way to restructure the code to preserve performance without loosing readability. hit-test-lots-of-layers of blink_perf.events was 12% slower. Before: https://pinpoint-dot-chromeperf.appspot.com/job/15069da7220000 After: https://pinpoint-dot-chromeperf.appspot.com/job/117e2deb220000 Bug: 977230 Change-Id: I92f64956f71e46ec613dbec31bb1eb545b7e9b05 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1955030 Commit-Queue: Vitaly Buka <vitalybuka@chromium.org> Reviewed-by:Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/master@{#723573}
Showing
Please register or sign in to comment