0

Add trace event for EnsureSqliteInitialized

Adding a trace event to look at databases/chrome startup.

We observed crash reports where the initialization occurs on a
background thread. Since we are unsure about the cost / impact
of that function we want to double check with slow-reports that
performance are fine.

R=sky@chromium.org

Change-Id: I7196fdc989c53eb8a37126972d8ce1b9fd5ff599
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2857994
Reviewed-by: Victor Costan <pwnall@chromium.org>
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#877737}
This commit is contained in:
Etienne Bergeron
2021-04-30 01:18:49 +00:00
committed by Chromium LUCI CQ
parent 6212b4b9b4
commit d4888dbd9a

@ -9,6 +9,7 @@
#include "base/no_destructor.h"
#include "base/numerics/safe_conversions.h"
#include "base/threading/sequenced_task_runner_handle.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "third_party/sqlite/sqlite3.h"
@ -52,6 +53,7 @@ void EnsureSqliteInitialized() {
static bool first_call = true;
if (first_call) {
TRACE_EVENT0("sql", "EnsureSqliteInitialized");
sqlite3_initialize();
#if !defined(OS_IOS)