[PATCH] D66189: [GWP-ASan] Implement stack frame compression.
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 13 17:15:06 PDT 2019
hctim created this revision.
hctim added a reviewer: vlad.tsyrklevich.
Herald added subscribers: llvm-commits, Sanitizers, mgorny.
Herald added projects: Sanitizers, LLVM.
This patch introduces stack frame compression to GWP-ASan. Each stack frame is
variable-length integer encoded as the difference between frame[i] and
frame[i - 1]. Furthermore, we use zig-zag encoding on the difference to ensure
that negative differences are also encoded into a relatively small number of
bytes.
Examples of what the compression looks like can be seen in
`gwp_asan/tests/compression.cpp`.
This compression can reduce the memory consumption cost of stack traces by
~50%.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D66189
Files:
compiler-rt/lib/gwp_asan/CMakeLists.txt
compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp
compiler-rt/lib/gwp_asan/guarded_pool_allocator.h
compiler-rt/lib/gwp_asan/options.inc
compiler-rt/lib/gwp_asan/stack_trace_compressor.cpp
compiler-rt/lib/gwp_asan/stack_trace_compressor.h
compiler-rt/lib/gwp_asan/stack_trace_compressor_fuzzer.cpp
compiler-rt/lib/gwp_asan/tests/compression.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66189.214990.patch
Type: text/x-patch
Size: 28868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190814/31b6d6cc/attachment.bin>
More information about the llvm-commits
mailing list