Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Side by Side Diff: Source/core/page/ConsoleBase.cpp

Issue 23848006: Put console.time into a separate trace event category. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 return; 151 return;
152 152
153 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, 1)); 153 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, 1));
154 InspectorInstrumentation::addProfile(context, profile, callStack); 154 InspectorInstrumentation::addProfile(context, profile, callStack);
155 } 155 }
156 156
157 157
158 void ConsoleBase::time(const String& title) 158 void ConsoleBase::time(const String& title)
159 { 159 {
160 InspectorInstrumentation::startConsoleTiming(context(), title); 160 InspectorInstrumentation::startConsoleTiming(context(), title);
161 TRACE_EVENT_COPY_ASYNC_BEGIN0("webkit", title.utf8().data(), this); 161 TRACE_EVENT_COPY_ASYNC_BEGIN0("webkit.console", title.utf8().data(), this);
162 } 162 }
163 163
164 void ConsoleBase::timeEnd(ScriptState* state, const String& title) 164 void ConsoleBase::timeEnd(ScriptState* state, const String& title)
165 { 165 {
166 TRACE_EVENT_COPY_ASYNC_END0("webkit", title.utf8().data(), this); 166 TRACE_EVENT_COPY_ASYNC_END0("webkit.console", title.utf8().data(), this);
167 RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(state)); 167 RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(state));
168 InspectorInstrumentation::stopConsoleTiming(context(), title, callStack.rele ase()); 168 InspectorInstrumentation::stopConsoleTiming(context(), title, callStack.rele ase());
169 } 169 }
170 170
171 void ConsoleBase::timeStamp(PassRefPtr<ScriptArguments> arguments) 171 void ConsoleBase::timeStamp(PassRefPtr<ScriptArguments> arguments)
172 { 172 {
173 InspectorInstrumentation::consoleTimeStamp(context(), arguments); 173 InspectorInstrumentation::consoleTimeStamp(context(), arguments);
174 } 174 }
175 175
176 void ConsoleBase::group(ScriptState* state, PassRefPtr<ScriptArguments> argument s) 176 void ConsoleBase::group(ScriptState* state, PassRefPtr<ScriptArguments> argument s)
(...skipping 25 matching lines...) Expand all
202 const ScriptCallFrame& lastCaller = callStack->at(0); 202 const ScriptCallFrame& lastCaller = callStack->at(0);
203 203
204 String message; 204 String message;
205 bool gotStringMessage = arguments->getFirstArgumentAsString(message); 205 bool gotStringMessage = arguments->getFirstArgumentAsString(message);
206 InspectorInstrumentation::addMessageToConsole(context(), ConsoleAPIMessageSo urce, type, level, message, state, arguments); 206 InspectorInstrumentation::addMessageToConsole(context(), ConsoleAPIMessageSo urce, type, level, message, state, arguments);
207 if (gotStringMessage) 207 if (gotStringMessage)
208 reportMessageToClient(level, message, callStack); 208 reportMessageToClient(level, message, callStack);
209 } 209 }
210 210
211 } // namespace WebCore 211 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698