Commit 289aed47 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

[leveldb] Do not emit trace events when ChromiumEnv.StorageService thread is sleeping

ConditionVariable by default emits a trace event from Wait().
Message pump like code needs to explicitly disable this to avoid
emitting trace events while sleeping that make the thread incorrectly
look busy.

R=pwnall@chromium.org

Bug: 899897
Change-Id: I5c7078db3e4889ae3e946e045a4e626fcd7ee8b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2090505
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarVictor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747924}
parent 38826959
......@@ -761,6 +761,9 @@ ChromiumEnv::ChromiumEnv(const std::string& name,
bgsignal_(&mu_),
started_bgthread_(false) {
DCHECK(filesystem_);
bgsignal_.declare_only_used_while_idle();
size_t max_open_files = base::GetMaxFds();
if (base::FeatureList::IsEnabled(kLevelDBFileHandleEviction) &&
max_open_files < kFileLimitToDisableEviction) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment