Skip to content

Commit

Permalink
Bug 1464310 - Add profiler stack labels which contain the sql string …
Browse files Browse the repository at this point in the history
…when statements are executed or stepped. r=mak

MozReview-Commit-ID: 3ucqNlHTqCw

--HG--
extra : rebase_source : 404a19f170871ddacfbc15f395f96759b6c0eef1
  • Loading branch information
mstange committed May 31, 2018
1 parent 3cc8e2d commit 3b10561
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions storage/mozStorageConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 3b10561

Please sign in to comment.