HomePhabricator

Lazily save initialState of registers during unwind.

Authored by saugustine on Mar 4 2020, 4:29 PM.

Description

Lazily save initialState of registers during unwind.

Summary:
Copying all of the saved register state on every entry to
parseInstruction is a severe performance contraint, especially
because most of this saved state is never used. On x86 linux
this is about 560 bytes, and will be more on other platforms.

When performance testing libunwind, this memcpy appears at the
top of nearly all our tests.

By only saving this state as needed, we see increasing in performance
of around 2.5% for the ctak test here.

https://github.com/clasp-developers/ctak

Certain internal extremely exception-heavy tasks run in about 2/3
the time.

Note that by stashing the new boolean inside what had been padding in
the original structure, this uses no additional memory.

Subscribers: fedor.sergeev, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D75692

Details

Committed
saugustineMar 11 2020, 10:13 AM
Differential Revision
D75692: Lazily save initialState of registers during unwind.
Parents
rGa9f15832287e: [AArch64][SVE] Add the @llvm.aarch64.sve.sel intrinsic
Branches
Unknown
Tags
Unknown