summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorscheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 20:14:33 +0000
committerscheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 20:14:33 +0000
commit39a52b444388584f604a5b14ed5983d2f23a418a (patch)
tree2531335e6735df54d7f525e896e61f8f249a2d47 /webkit
parent4d4c0780f53e428a1d4c24ebf4e509490d56a7fc (diff)
downloadchromium_src-39a52b444388584f604a5b14ed5983d2f23a418a.zip
chromium_src-39a52b444388584f604a5b14ed5983d2f23a418a.tar.gz
chromium_src-39a52b444388584f604a5b14ed5983d2f23a418a.tar.bz2
Revert 84284 - Merge gpu_trace_event back into base/debug/trace_event.Initial land attempt at http://codereview.chromium.org/6551019/gpu_trace_event fork at http://codereview.chromium.org/6691013- gpu_trace_event renamed to base/debug/trace_event and modified as appropriate for base::debug- Unit Tests implemented for trace_event- gpu_common library removed (was added only for gpu_trace_event)- Existing calls to trace_event suffixed with _ETW to make ETW calls (see decisions and incremental plans at end of 6551019)- GPU trace calls renamed to new calls.- Tracing switch removed from test_shell, as linux log file support removed.BUG=79509TEST=trace_event_win_unittest and about:gpuReview URL: http://codereview.chromium.org/6862002
TBR=scheib@chromium.org Review URL: http://codereview.chromium.org/6933035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84293 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webkit_glue.gypi1
-rw-r--r--webkit/glue/webkitclient_impl.cc9
-rw-r--r--webkit/tools/test_shell/test_shell_main.cc3
-rw-r--r--webkit/tools/test_shell/test_shell_switches.cc5
-rw-r--r--webkit/tools/test_shell/test_shell_switches.h3
-rw-r--r--webkit/tools/test_shell/test_shell_win.cc2
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc6
7 files changed, 21 insertions, 8 deletions
diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi
index a949168..1e1bfec 100644
--- a/webkit/glue/webkit_glue.gypi
+++ b/webkit/glue/webkit_glue.gypi
@@ -107,6 +107,7 @@
'dependencies': [
'<(DEPTH)/app/app.gyp:app_base',
'<(DEPTH)/base/base.gyp:base_i18n',
+ '<(DEPTH)/gpu/gpu.gyp:gpu_common',
'<(DEPTH)/gpu/gpu.gyp:gles2_implementation',
'<(DEPTH)/net/net.gyp:net',
'<(DEPTH)/ppapi/ppapi.gyp:ppapi_shared_impl',
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index 4244bc3f..882cb42 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -25,6 +25,7 @@
#include "base/synchronization/lock.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
+#include "gpu/common/gpu_trace_event.h"
#include "grit/webkit_chromium_resources.h"
#include "grit/webkit_resources.h"
#include "grit/webkit_strings.h"
@@ -283,12 +284,16 @@ void WebKitClientImpl::histogramEnumeration(
void WebKitClientImpl::traceEventBegin(const char* name, void* id,
const char* extra) {
- TRACE_EVENT_BEGIN_ETW(name, id, extra);
+ TRACE_EVENT_BEGIN(name, id, extra);
+ GPU_TRACE_EVENT_BEGIN2("webkit", name,
+ "id", id,
+ "extra", extra ? extra : "");
}
void WebKitClientImpl::traceEventEnd(const char* name, void* id,
const char* extra) {
- TRACE_EVENT_END_ETW(name, id, extra);
+ TRACE_EVENT_END(name, id, extra);
+ GPU_TRACE_EVENT_END0("webkit", name);
}
namespace {
diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc
index e107b6a..49ed62b 100644
--- a/webkit/tools/test_shell/test_shell_main.cc
+++ b/webkit/tools/test_shell/test_shell_main.cc
@@ -158,6 +158,9 @@ int main(int argc, char* argv[]) {
platform.SuppressErrorReporting();
}
+ if (parsed_command_line.HasSwitch(test_shell::kEnableTracing))
+ base::debug::TraceLog::StartTracing();
+
net::HttpCache::Mode cache_mode = net::HttpCache::NORMAL;
// This is a special mode where JS helps the browser implement
diff --git a/webkit/tools/test_shell/test_shell_switches.cc b/webkit/tools/test_shell/test_shell_switches.cc
index fd88861..713aaed 100644
--- a/webkit/tools/test_shell/test_shell_switches.cc
+++ b/webkit/tools/test_shell/test_shell_switches.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -65,6 +65,9 @@ const char kDebugMemoryInUse[] = "debug-memory-in-use";
// Enable cookies on the file:// scheme. --layout-tests also enables this.
const char kEnableFileCookies[] = "enable-file-cookies";
+// Enable tracing events (see base/debug/trace_event.h)
+const char kEnableTracing[] = "enable-tracing";
+
// Allow scripts to close windows in all cases.
const char kAllowScriptsToCloseWindows[] = "allow-scripts-to-close-windows";
diff --git a/webkit/tools/test_shell/test_shell_switches.h b/webkit/tools/test_shell/test_shell_switches.h
index 884b66625..dd4d451 100644
--- a/webkit/tools/test_shell/test_shell_switches.h
+++ b/webkit/tools/test_shell/test_shell_switches.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -27,6 +27,7 @@ extern const char kDumpStatsTable[];
extern const char kCacheDir[];
extern const char kDebugMemoryInUse[];
extern const char kEnableFileCookies[];
+extern const char kEnableTracing[];
extern const char kAllowScriptsToCloseWindows[];
extern const char kCheckLayoutTestSystemDeps[];
extern const char kGDB[];
diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc
index 8245b6e..6b4d00f7 100644
--- a/webkit/tools/test_shell/test_shell_win.cc
+++ b/webkit/tools/test_shell/test_shell_win.cc
@@ -479,7 +479,7 @@ void TestShell::LoadURLForFrame(const GURL& url,
if (!url.is_valid())
return;
- TRACE_EVENT_BEGIN_ETW("url.load", this, url.spec());
+ TRACE_EVENT_BEGIN("url.load", this, url.spec());
if (IsSVGTestURL(url)) {
SizeToSVG();
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 4fe60e8..745b2d0 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -819,7 +819,7 @@ void TestWebViewDelegate::didFailLoad(
}
void TestWebViewDelegate::didFinishLoad(WebFrame* frame) {
- TRACE_EVENT_END_ETW("frame.load", this, frame->url().spec());
+ TRACE_EVENT_END("frame.load", this, frame->url().spec());
UpdateAddressBar(frame->view());
LocationChangeDone(frame);
}
@@ -877,7 +877,7 @@ void TestWebViewDelegate::willSendRequest(
header != clear_headers_.end(); ++header)
request.clearHTTPHeaderField(WebString::fromUTF8(*header));
- TRACE_EVENT_BEGIN_ETW("url.load", identifier, request_url);
+ TRACE_EVENT_BEGIN("url.load", identifier, request_url);
// Set the new substituted URL.
request.setURL(GURL(TestShell::RewriteLocalUrl(request_url)));
}
@@ -888,7 +888,7 @@ void TestWebViewDelegate::didReceiveResponse(
void TestWebViewDelegate::didFinishResourceLoad(
WebFrame* frame, unsigned identifier) {
- TRACE_EVENT_END_ETW("url.load", identifier, "");
+ TRACE_EVENT_END("url.load", identifier, "");
resource_identifier_map_.erase(identifier);
}