[libcxx-commits] [PATCH] D75692: Lazily save initialState of registers during unwind.

Sterling Augustine via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 5 09:50:55 PST 2020


saugustine created this revision.
Herald added subscribers: libcxx-commits, fedor.sergeev.
Herald added a project: libc++.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75692

Files:
  libunwind/src/DwarfParser.hpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75692.248516.patch
Type: text/x-patch
Size: 9971 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200305/1c66ff62/attachment.bin>


More information about the libcxx-commits mailing list