Skip to content

Commit

Permalink
Revert "[sanitizer] Add compress_stack_depot flag"
Browse files Browse the repository at this point in the history
This is failing on clang-s390x-linux,
https://lab.llvm.org/buildbot/#/builders/94/builds/6748.
This reverts commit bf18253.
  • Loading branch information
steven-wan-yu committed Dec 2, 2021
1 parent 863b117 commit f9d585d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 54 deletions.
2 changes: 0 additions & 2 deletions compiler-rt/lib/sanitizer_common/sanitizer_flags.inc
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ COMMON_FLAG(const char *, stack_trace_format, "DEFAULT",
"Format string used to render stack frames. "
"See sanitizer_stacktrace_printer.h for the format description. "
"Use DEFAULT to get default format.")
COMMON_FLAG(int, compress_stack_depot, 0,
"Compress stack depot to save memory.")
COMMON_FLAG(bool, no_huge_pages_for_shadow, true,
"If true, the shadow is not allowed to use huge pages. ")
COMMON_FLAG(bool, strict_string_checks, false,
Expand Down
17 changes: 2 additions & 15 deletions compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,12 @@ uptr StackDepotNode::allocated() {
return stackStore.Allocated() + useCounts.MemoryUsage();
}

static void CompressStackStore() {
u64 start = MonotonicNanoTime();
uptr diff = stackStore.Pack(static_cast<StackStore::Compression>(
common_flags()->compress_stack_depot));
if (!diff)
return;
u64 finish = MonotonicNanoTime();
uptr total = stackStore.Allocated();
VPrintf(1, "%s: StackDepot released %zu KiB out of %zu KiB in %llu ms\n",
SanitizerToolName, diff >> 10, total >> 10,
(finish - start) / 1000000);
}

void StackDepotNode::store(u32 id, const args_type &args, hash_type hash) {
stack_hash = hash;
uptr pack = 0;
store_id = stackStore.Store(args, &pack);
if (pack && common_flags()->compress_stack_depot)
CompressStackStore();
if (pack)
stackStore.Pack(StackStore::Compression::None);
}

StackDepotNode::args_type StackDepotNode::load(u32 id) const {
Expand Down

This file was deleted.

0 comments on commit f9d585d

Please sign in to comment.