Title: [125277] trunk
Revision
125277
Author
[email protected]
Date
2012-08-10 06:42:47 -0700 (Fri, 10 Aug 2012)

Log Message

Web Inspector: add frame ids to TimeStamp, Time and TimeEnd records in Timeline
https://bugs.webkit.org/show_bug.cgi?id=93699

Reviewed by Pavel Feldman.

Source/WebCore:

- plumb Frame from Console to TimelineAgent and use it to add frameId to 3 timeline records;

* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::startConsoleTiming):
(WebCore::InspectorInstrumentation::stopConsoleTiming):
(WebCore::InspectorInstrumentation::consoleTimeStamp):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::startConsoleTimingImpl):
(WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
(WebCore::InspectorInstrumentation::consoleTimeStampImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didTimeStamp):
(WebCore::InspectorTimelineAgent::time):
(WebCore::InspectorTimelineAgent::timeEnd):
* inspector/InspectorTimelineAgent.h:
(InspectorTimelineAgent):
* page/Console.cpp:
(WebCore::Console::markTimeline):
(WebCore::Console::time):
(WebCore::Console::timeEnd):
(WebCore::Console::timeStamp):

LayoutTests:

- rebased expectations to include frameId field;
- removed platform overrides for chromium as these are identical to the default ones;

* inspector/timeline/timeline-mark-timeline-expected.txt:
* inspector/timeline/timeline-time-stamp-expected.txt:
* platform/chromium/inspector/timeline/timeline-mark-timeline-expected.txt: Removed.
* platform/chromium/inspector/timeline/timeline-time-stamp-expected.txt: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (125276 => 125277)


--- trunk/LayoutTests/ChangeLog	2012-08-10 13:40:33 UTC (rev 125276)
+++ trunk/LayoutTests/ChangeLog	2012-08-10 13:42:47 UTC (rev 125277)
@@ -1,3 +1,18 @@
+2012-08-10  Andrey Kosyakov  <[email protected]>
+
+        Web Inspector: add frame ids to TimeStamp, Time and TimeEnd records in Timeline
+        https://bugs.webkit.org/show_bug.cgi?id=93699
+
+        Reviewed by Pavel Feldman.
+
+        - rebased expectations to include frameId field;
+        - removed platform overrides for chromium as these are identical to the default ones;
+
+        * inspector/timeline/timeline-mark-timeline-expected.txt:
+        * inspector/timeline/timeline-time-stamp-expected.txt:
+        * platform/chromium/inspector/timeline/timeline-mark-timeline-expected.txt: Removed.
+        * platform/chromium/inspector/timeline/timeline-time-stamp-expected.txt: Removed.
+
 2012-08-10  Zoltan Arvai  <[email protected]>
 
         [Qt] Unreviwed gardening.

Modified: trunk/LayoutTests/inspector/timeline/timeline-mark-timeline-expected.txt (125276 => 125277)


--- trunk/LayoutTests/inspector/timeline/timeline-mark-timeline-expected.txt	2012-08-10 13:40:33 UTC (rev 125276)
+++ trunk/LayoutTests/inspector/timeline/timeline-mark-timeline-expected.txt	2012-08-10 13:42:47 UTC (rev 125277)
@@ -8,6 +8,7 @@
         message : "MARK TIMELINE"
     }
     type : "TimeStamp"
+    frameId : <string>
     usedHeapSize : <number>
     totalHeapSize : <number>
     counters : <object>

Modified: trunk/LayoutTests/inspector/timeline/timeline-time-stamp-expected.txt (125276 => 125277)


--- trunk/LayoutTests/inspector/timeline/timeline-time-stamp-expected.txt	2012-08-10 13:40:33 UTC (rev 125276)
+++ trunk/LayoutTests/inspector/timeline/timeline-time-stamp-expected.txt	2012-08-10 13:42:47 UTC (rev 125277)
@@ -8,6 +8,7 @@
         message : "TIME STAMP"
     }
     type : "TimeStamp"
+    frameId : <string>
     usedHeapSize : <number>
     totalHeapSize : <number>
     counters : <object>
@@ -21,6 +22,7 @@
         message : "TIME STAMP"
     }
     type : "TimeStamp"
+    frameId : <string>
     usedHeapSize : <number>
     totalHeapSize : <number>
     counters : <object>

Deleted: trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-mark-timeline-expected.txt (125276 => 125277)


--- trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-mark-timeline-expected.txt	2012-08-10 13:40:33 UTC (rev 125276)
+++ trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-mark-timeline-expected.txt	2012-08-10 13:42:47 UTC (rev 125277)
@@ -1,15 +0,0 @@
-Tests the Timeline API mark feature
-
-TimeStamp Properties:
-{
-    startTime : <number>
-    stackTrace : <object>
-    data : {
-        message : "MARK TIMELINE"
-    }
-    type : "TimeStamp"
-    usedHeapSize : <number>
-    totalHeapSize : <number>
-    counters : <object>
-}
-

Modified: trunk/Source/WebCore/ChangeLog (125276 => 125277)


--- trunk/Source/WebCore/ChangeLog	2012-08-10 13:40:33 UTC (rev 125276)
+++ trunk/Source/WebCore/ChangeLog	2012-08-10 13:42:47 UTC (rev 125277)
@@ -1,3 +1,35 @@
+2012-08-10  Andrey Kosyakov  <[email protected]>
+
+        Web Inspector: add frame ids to TimeStamp, Time and TimeEnd records in Timeline
+        https://bugs.webkit.org/show_bug.cgi?id=93699
+
+        Reviewed by Pavel Feldman.
+
+        - plumb Frame from Console to TimelineAgent and use it to add frameId to 3 timeline records;
+
+        * inspector/InspectorConsoleInstrumentation.h:
+        (WebCore::InspectorInstrumentation::startConsoleTiming):
+        (WebCore::InspectorInstrumentation::stopConsoleTiming):
+        (WebCore::InspectorInstrumentation::consoleTimeStamp):
+        * inspector/InspectorInstrumentation.cpp:
+        (WebCore):
+        (WebCore::InspectorInstrumentation::startConsoleTimingImpl):
+        (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
+        (WebCore::InspectorInstrumentation::consoleTimeStampImpl):
+        * inspector/InspectorInstrumentation.h:
+        (InspectorInstrumentation):
+        * inspector/InspectorTimelineAgent.cpp:
+        (WebCore::InspectorTimelineAgent::didTimeStamp):
+        (WebCore::InspectorTimelineAgent::time):
+        (WebCore::InspectorTimelineAgent::timeEnd):
+        * inspector/InspectorTimelineAgent.h:
+        (InspectorTimelineAgent):
+        * page/Console.cpp:
+        (WebCore::Console::markTimeline):
+        (WebCore::Console::time):
+        (WebCore::Console::timeEnd):
+        (WebCore::Console::timeStamp):
+
 2012-08-10  Simon Hausmann  <[email protected]>
 
         [Qt] Fix failing assertions when using JSC C API in QObject bridge

Modified: trunk/Source/WebCore/inspector/InspectorConsoleInstrumentation.h (125276 => 125277)


--- trunk/Source/WebCore/inspector/InspectorConsoleInstrumentation.h	2012-08-10 13:40:33 UTC (rev 125276)
+++ trunk/Source/WebCore/inspector/InspectorConsoleInstrumentation.h	2012-08-10 13:42:47 UTC (rev 125277)
@@ -81,28 +81,28 @@
 #endif
 }
 
-inline void InspectorInstrumentation::startConsoleTiming(Page* page, const String& title)
+inline void InspectorInstrumentation::startConsoleTiming(Frame* frame, const String& title)
 {
 #if ENABLE(INSPECTOR)
-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
-        startConsoleTimingImpl(instrumentingAgents, title);
+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
+        startConsoleTimingImpl(instrumentingAgents, frame, title);
 #endif
 }
 
-inline void InspectorInstrumentation::stopConsoleTiming(Page* page, const String& title, PassRefPtr<ScriptCallStack> stack)
+inline void InspectorInstrumentation::stopConsoleTiming(Frame* frame, const String& title, PassRefPtr<ScriptCallStack> stack)
 {
 #if ENABLE(INSPECTOR)
-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
-        stopConsoleTimingImpl(instrumentingAgents, title, stack);
+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
+        stopConsoleTimingImpl(instrumentingAgents, frame, title, stack);
 #endif
 }
 
-inline void InspectorInstrumentation::consoleTimeStamp(Page* page, PassRefPtr<ScriptArguments> arguments)
+inline void InspectorInstrumentation::consoleTimeStamp(Frame* frame, PassRefPtr<ScriptArguments> arguments)
 {
 #if ENABLE(INSPECTOR)
     FAST_RETURN_IF_NO_FRONTENDS(void());
-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
-        consoleTimeStampImpl(instrumentingAgents, arguments);
+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
+        consoleTimeStampImpl(instrumentingAgents, frame, arguments);
 #endif
 }
 

Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (125276 => 125277)


--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp	2012-08-10 13:40:33 UTC (rev 125276)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp	2012-08-10 13:42:47 UTC (rev 125277)
@@ -907,28 +907,28 @@
         consoleAgent->count(arguments, stack);
 }
 
-void InspectorInstrumentation::startConsoleTimingImpl(InstrumentingAgents* instrumentingAgents, const String& title)
+void InspectorInstrumentation::startConsoleTimingImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, const String& title)
 {
     if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent())
-        timelineAgent->time(title);
+        timelineAgent->time(frame, title);
     if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
         consoleAgent->startTiming(title);
 }
 
-void InspectorInstrumentation::stopConsoleTimingImpl(InstrumentingAgents* instrumentingAgents, const String& title, PassRefPtr<ScriptCallStack> stack)
+void InspectorInstrumentation::stopConsoleTimingImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, const String& title, PassRefPtr<ScriptCallStack> stack)
 {
     if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
         consoleAgent->stopTiming(title, stack);
     if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent())
-        timelineAgent->timeEnd(title);
+        timelineAgent->timeEnd(frame, title);
 }
 
-void InspectorInstrumentation::consoleTimeStampImpl(InstrumentingAgents* instrumentingAgents, PassRefPtr<ScriptArguments> arguments)
+void InspectorInstrumentation::consoleTimeStampImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, PassRefPtr<ScriptArguments> arguments)
 {
     if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent()) {
         String message;
         arguments->getFirstArgumentAsString(message);
-        timelineAgent->didTimeStamp(message);
+        timelineAgent->didTimeStamp(frame, message);
      }
 }
 

Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (125276 => 125277)


--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h	2012-08-10 13:40:33 UTC (rev 125276)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h	2012-08-10 13:42:47 UTC (rev 125277)
@@ -202,9 +202,9 @@
     static void addMessageToConsole(WorkerContext*, MessageSource, MessageType, MessageLevel, const String& message, const String&, unsigned lineNumber);
 #endif
     static void consoleCount(Page*, PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>);
-    static void startConsoleTiming(Page*, const String& title);
-    static void stopConsoleTiming(Page*, const String& title, PassRefPtr<ScriptCallStack>);
-    static void consoleTimeStamp(Page*, PassRefPtr<ScriptArguments>);
+    static void startConsoleTiming(Frame*, const String& title);
+    static void stopConsoleTiming(Frame*, const String& title, PassRefPtr<ScriptCallStack>);
+    static void consoleTimeStamp(Frame*, PassRefPtr<ScriptArguments>);
 
     static void didRequestAnimationFrame(Document*, int callbackId);
     static void didCancelAnimationFrame(Document*, int callbackId);
@@ -378,9 +378,9 @@
     static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>);
     static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber);
     static void consoleCountImpl(InstrumentingAgents*, PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>);
-    static void startConsoleTimingImpl(InstrumentingAgents*, const String& title);
-    static void stopConsoleTimingImpl(InstrumentingAgents*, const String& title, PassRefPtr<ScriptCallStack>);
-    static void consoleTimeStampImpl(InstrumentingAgents*, PassRefPtr<ScriptArguments>);
+    static void startConsoleTimingImpl(InstrumentingAgents*, Frame*, const String& title);
+    static void stopConsoleTimingImpl(InstrumentingAgents*, Frame*, const String& title, PassRefPtr<ScriptCallStack>);
+    static void consoleTimeStampImpl(InstrumentingAgents*, Frame*, PassRefPtr<ScriptArguments>);
 
     static void didRequestAnimationFrameImpl(InstrumentingAgents*, int callbackId, Frame*);
     static void didCancelAnimationFrameImpl(InstrumentingAgents*, int callbackId, Frame*);

Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp (125276 => 125277)


--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp	2012-08-10 13:40:33 UTC (rev 125276)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp	2012-08-10 13:42:47 UTC (rev 125277)
@@ -378,19 +378,19 @@
     appendRecord(TimelineRecordFactory::createResourceFinishData(IdentifiersFactory::requestId(identifier), didFail, finishTime * 1000), TimelineRecordType::ResourceFinish, false, frame);
 }
 
-void InspectorTimelineAgent::didTimeStamp(const String& message)
+void InspectorTimelineAgent::didTimeStamp(Frame* frame, const String& message)
 {
-    appendRecord(TimelineRecordFactory::createTimeStampData(message), TimelineRecordType::TimeStamp, true, 0);
+    appendRecord(TimelineRecordFactory::createTimeStampData(message), TimelineRecordType::TimeStamp, true, frame);
 }
 
-void InspectorTimelineAgent::time(const String& message)
+void InspectorTimelineAgent::time(Frame* frame, const String& message)
 {
-    appendRecord(TimelineRecordFactory::createTimeStampData(message), TimelineRecordType::Time, true, 0);
+    appendRecord(TimelineRecordFactory::createTimeStampData(message), TimelineRecordType::Time, true, frame);
 }
 
-void InspectorTimelineAgent::timeEnd(const String& message)
+void InspectorTimelineAgent::timeEnd(Frame* frame, const String& message)
 {
-    appendRecord(TimelineRecordFactory::createTimeStampData(message), TimelineRecordType::TimeEnd, true, 0);
+    appendRecord(TimelineRecordFactory::createTimeStampData(message), TimelineRecordType::TimeEnd, true, frame);
 }
 
 void InspectorTimelineAgent::didMarkDOMContentEvent(Frame* frame)

Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.h (125276 => 125277)


--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.h	2012-08-10 13:40:33 UTC (rev 125276)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.h	2012-08-10 13:42:47 UTC (rev 125277)
@@ -121,12 +121,12 @@
     void willEvaluateScript(const String&, int, Frame*);
     void didEvaluateScript();
 
-    void didTimeStamp(const String&);
+    void didTimeStamp(Frame*, const String&);
     void didMarkDOMContentEvent(Frame*);
     void didMarkLoadEvent(Frame*);
 
-    void time(const String&);
-    void timeEnd(const String&);
+    void time(Frame*, const String&);
+    void timeEnd(Frame*, const String&);
 
     void didScheduleResourceRequest(const String& url, Frame*);
     void willSendResourceRequest(unsigned long, const ResourceRequest&, Frame*);

Modified: trunk/Source/WebCore/page/Console.cpp (125276 => 125277)


--- trunk/Source/WebCore/page/Console.cpp	2012-08-10 13:40:33 UTC (rev 125276)
+++ trunk/Source/WebCore/page/Console.cpp	2012-08-10 13:42:47 UTC (rev 125277)
@@ -262,7 +262,7 @@
 
 void Console::markTimeline(PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack>)
 {
-    InspectorInstrumentation::consoleTimeStamp(page(), arguments);
+    InspectorInstrumentation::consoleTimeStamp(m_frame, arguments);
 }
 
 #if ENABLE(_javascript__DEBUGGER)
@@ -308,7 +308,7 @@
 
 void Console::time(const String& title)
 {
-    InspectorInstrumentation::startConsoleTiming(page(), title);
+    InspectorInstrumentation::startConsoleTiming(m_frame, title);
 #if PLATFORM(CHROMIUM)
     TRACE_EVENT_COPY_ASYNC_BEGIN0("webkit", title.utf8().data(), this);
 #endif
@@ -319,12 +319,12 @@
 #if PLATFORM(CHROMIUM)
     TRACE_EVENT_COPY_ASYNC_END0("webkit", title.utf8().data(), this);
 #endif
-    InspectorInstrumentation::stopConsoleTiming(page(), title, callStack);
+    InspectorInstrumentation::stopConsoleTiming(m_frame, title, callStack);
 }
 
 void Console::timeStamp(PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack>)
 {
-    InspectorInstrumentation::consoleTimeStamp(page(), arguments);
+    InspectorInstrumentation::consoleTimeStamp(m_frame, arguments);
 }
 
 void Console::group(PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack> callStack)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to