Commit 8ed53896 authored by ernstm@chromium.org's avatar ernstm@chromium.org

Put console.time into a separate trace event category.

In rendering benchmarks we want to only capture trace events that are
required for the benchmark. console.time is used frequently, but everything
else from the 'webkit' category is not. Putting console.time into a separate
category 'webkit.console' will reduce overhead and make trace buffer overflows
less likely.

R=jamesr@chromium.org, nduca@chromium.org, tonyg@chromium.org
BUG=264308

Review URL: https://chromiumcodereview.appspot.com/23848006

git-svn-id: svn://svn.chromium.org/blink/trunk@157377 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent b88b3edb
...@@ -158,12 +158,12 @@ void ConsoleBase::profileEnd(ScriptState* state, const String& title) ...@@ -158,12 +158,12 @@ void ConsoleBase::profileEnd(ScriptState* state, const String& title)
void ConsoleBase::time(const String& title) void ConsoleBase::time(const String& title)
{ {
InspectorInstrumentation::startConsoleTiming(context(), title); InspectorInstrumentation::startConsoleTiming(context(), title);
TRACE_EVENT_COPY_ASYNC_BEGIN0("webkit", title.utf8().data(), this); TRACE_EVENT_COPY_ASYNC_BEGIN0("webkit.console", title.utf8().data(), this);
} }
void ConsoleBase::timeEnd(ScriptState* state, const String& title) void ConsoleBase::timeEnd(ScriptState* state, const String& title)
{ {
TRACE_EVENT_COPY_ASYNC_END0("webkit", title.utf8().data(), this); TRACE_EVENT_COPY_ASYNC_END0("webkit.console", title.utf8().data(), this);
RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(state)); RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(state));
InspectorInstrumentation::stopConsoleTiming(context(), title, callStack.release()); InspectorInstrumentation::stopConsoleTiming(context(), title, callStack.release());
} }
......
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