From 3b1056192989fce5e9cbc375c6aa890fbabe709f Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Thu, 31 May 2018 14:06:45 -0400 Subject: [PATCH] Bug 1464310 - Add profiler stack labels which contain the sql string when statements are executed or stepped. r=mak MozReview-Commit-ID: 3ucqNlHTqCw --HG-- extra : rebase_source : 404a19f170871ddacfbc15f395f96759b6c0eef1 --- storage/mozStorageConnection.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/storage/mozStorageConnection.cpp b/storage/mozStorageConnection.cpp index 21d8020eb8d7..03283e37c253 100644 --- a/storage/mozStorageConnection.cpp +++ b/storage/mozStorageConnection.cpp @@ -1166,6 +1166,10 @@ int Connection::stepStatement(sqlite3 *aNativeConnection, sqlite3_stmt *aStatement) { MOZ_ASSERT(aStatement); + + AUTO_PROFILER_LABEL_DYNAMIC_CSTR("Connection::stepStatement", OTHER, + ::sqlite3_sql(aStatement)); + bool checkedMainThread = false; TimeStamp startTime = TimeStamp::Now(); @@ -1279,6 +1283,8 @@ Connection::executeSql(sqlite3 *aNativeConnection, const char *aSqlString) if (!isConnectionReadyOnThisThread()) return SQLITE_MISUSE; + AUTO_PROFILER_LABEL_DYNAMIC_CSTR("Connection::executeSql", OTHER, aSqlString); + TimeStamp startTime = TimeStamp::Now(); int srv = ::sqlite3_exec(aNativeConnection, aSqlString, nullptr, nullptr, nullptr);