Title: [87988] trunk/Source/WebCore
- Revision
- 87988
- Author
- [email protected]
- Date
- 2011-06-02 19:34:31 -0700 (Thu, 02 Jun 2011)
Log Message
2011-06-02 James Robinson <[email protected]>
Reviewed by Dimitri Glazkov.
[chromium][V8] Add trace events for timer fires and event listener dispatches
https://bugs.webkit.org/show_bug.cgi?id=61977
Adds TRACE_EVENT macro around timer and event listener dispatches. When tracing (a chromium feature) is
enabled, this allows correlating these events with painting, compositing, and everything else in chromium that
is traced. When tracing is disabled, this macro does nothing useful. Trace points are very cheap when tracing
is disabled so this should have no performance impact for non-developers.
* bindings/v8/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* bindings/v8/V8EventListener.cpp:
(WebCore::V8EventListener::callListenerFunction):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (87987 => 87988)
--- trunk/Source/WebCore/ChangeLog 2011-06-03 02:10:44 UTC (rev 87987)
+++ trunk/Source/WebCore/ChangeLog 2011-06-03 02:34:31 UTC (rev 87988)
@@ -1,3 +1,20 @@
+2011-06-02 James Robinson <[email protected]>
+
+ Reviewed by Dimitri Glazkov.
+
+ [chromium][V8] Add trace events for timer fires and event listener dispatches
+ https://bugs.webkit.org/show_bug.cgi?id=61977
+
+ Adds TRACE_EVENT macro around timer and event listener dispatches. When tracing (a chromium feature) is
+ enabled, this allows correlating these events with painting, compositing, and everything else in chromium that
+ is traced. When tracing is disabled, this macro does nothing useful. Trace points are very cheap when tracing
+ is disabled so this should have no performance impact for non-developers.
+
+ * bindings/v8/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::execute):
+ * bindings/v8/V8EventListener.cpp:
+ (WebCore::V8EventListener::callListenerFunction):
+
2011-06-02 John Bates <[email protected]>
Reviewed by James Robinson.
Modified: trunk/Source/WebCore/bindings/v8/ScheduledAction.cpp (87987 => 87988)
--- trunk/Source/WebCore/bindings/v8/ScheduledAction.cpp 2011-06-03 02:10:44 UTC (rev 87987)
+++ trunk/Source/WebCore/bindings/v8/ScheduledAction.cpp 2011-06-03 02:34:31 UTC (rev 87988)
@@ -34,6 +34,7 @@
#include "Document.h"
#include "ScriptExecutionContext.h"
#include "ScriptSourceCode.h"
+#include "TraceEvent.h"
#include "V8Binding.h"
#include "V8Proxy.h"
@@ -110,6 +111,8 @@
if (v8Context.IsEmpty())
return; // JS may not be enabled.
+ TRACE_EVENT("ScheduledAction::execute", this, 0);
+
v8::Context::Scope scope(v8Context);
proxy->setTimerCallback(true);
Modified: trunk/Source/WebCore/bindings/v8/V8EventListener.cpp (87987 => 87988)
--- trunk/Source/WebCore/bindings/v8/V8EventListener.cpp 2011-06-03 02:10:44 UTC (rev 87987)
+++ trunk/Source/WebCore/bindings/v8/V8EventListener.cpp 2011-06-03 02:34:31 UTC (rev 87988)
@@ -31,6 +31,7 @@
#include "config.h"
#include "V8EventListener.h"
+#include "TraceEvent.h"
#include "V8Proxy.h"
namespace WebCore {
@@ -73,6 +74,8 @@
v8::Handle<v8::Value> parameters[1] = { jsEvent };
+ TRACE_EVENT("V8EventListener::callListenerFunction", this, 0);
+
if (V8Proxy* proxy = V8Proxy::retrieve(context))
return proxy->callFunction(handlerFunction, receiver, 1, parameters);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes