WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 105796
Web Inspector: plumb trace events to Timeline agent
https://bugs.webkit.org/show_bug.cgi?id=105796
Summary
Web Inspector: plumb trace events to Timeline agent
Andrey Kosyakov
Reported
2012-12-27 04:30:29 PST
Some of the events that we want to display in Timeline panel are not convenient to plumb using present instrumentation interfaces. This adds support for handling trace events in Timeline panel and uses it to instrument deferred painting of layers.
Attachments
Patch
(30.30 KB, patch)
2012-12-27 04:37 PST
,
Andrey Kosyakov
no flags
Details
Formatted Diff
Diff
Patch
(26.03 KB, patch)
2012-12-28 08:00 PST
,
Andrey Kosyakov
no flags
Details
Formatted Diff
Diff
Patch
(30.63 KB, patch)
2012-12-28 08:56 PST
,
Andrey Kosyakov
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Patch
(30.62 KB, patch)
2012-12-29 00:48 PST
,
Andrey Kosyakov
no flags
Details
Formatted Diff
Diff
Patch
(30.56 KB, patch)
2012-12-29 04:12 PST
,
Andrey Kosyakov
no flags
Details
Formatted Diff
Diff
Patch
(45.51 KB, patch)
2013-02-01 03:21 PST
,
Andrey Kosyakov
no flags
Details
Formatted Diff
Diff
Patch
(35.89 KB, patch)
2013-02-01 05:03 PST
,
Andrey Kosyakov
no flags
Details
Formatted Diff
Diff
Patch
(36.15 KB, patch)
2013-02-04 08:24 PST
,
Andrey Kosyakov
no flags
Details
Formatted Diff
Diff
Patch
(36.20 KB, patch)
2013-02-04 08:29 PST
,
Andrey Kosyakov
no flags
Details
Formatted Diff
Diff
Patch
(36.22 KB, patch)
2013-02-04 08:38 PST
,
Andrey Kosyakov
pfeldman
: review+
webkit-ews
: commit-queue-
Details
Formatted Diff
Diff
EWS run
(37.12 KB, patch)
2013-02-26 07:02 PST
,
Andrey Kosyakov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(9)
View All
Add attachment
proposed patch, testcase, etc.
Andrey Kosyakov
Comment 1
2012-12-27 04:37:40 PST
Created
attachment 180791
[details]
Patch
Pavel Feldman
Comment 2
2012-12-27 04:58:12 PST
Comment on
attachment 180791
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=180791&action=review
> Source/WebCore/inspector/InspectorInstrumentation.h:122 > + static void didReportTraceEvent(Page*, char phase, const char* categoryName, const char* name, unsigned long long id,
traceEvent ?
> Source/WebCore/inspector/InspectorTimelineAgent.cpp:117 > + : m_size(numArguments), m_argumentNames(argumentNames), m_argumentTypes(argumentTypes), m_argumentValues(argumentValues)
stack these please. who owns the argumentNames?
> Source/WebCore/inspector/InspectorTimelineAgent.cpp:123 > + bool getBool(const char* name) const { return getParameter(name, TRACE_VALUE_TYPE_BOOL).m_bool; }
Place block on its own lines. asBool(const char* name).
> Source/WebCore/inspector/InspectorTimelineAgent.cpp:140 > + const TraceValueUnion& getParameter(const char* name, char expectedType) const
parameter(
> Source/WebCore/inspector/InspectorTimelineAgent.cpp:226 > + m_client->enableTraceEventsReporting(true);
setReportTraceEvents
> Source/WebCore/inspector/InspectorTimelineAgent.cpp:243 > + m_deferredPaintLayerId = 0;
Lets split these.
> Source/WebCore/inspector/InspectorTimelineAgent.cpp:378 > + TraceEventHandler handler = m_traceEventHandlers.get(name);
Lets make name+phase a key.
> Source/WebCore/inspector/InspectorTimelineAgent.cpp:385 > +const char kLayerId[] = "layerId";
anonymous namespace for this one?
> Source/WebCore/inspector/InspectorTimelineAgent.cpp:692 > + m_traceEventHandlers.set("Instrumentation::DeferPaint", &InspectorTimelineAgent::onDeferPaint);
I would whitelist the ones we want to expose + handle specifics using switch. Or lets introduce generic fallback handler. Or rename to onTraceEventDeferPaint
> Source/WebCore/inspector/InspectorTimelineAgent.cpp:725 > +void InspectorTimelineAgent::pushSkippedRecord(const String& type)
mute? Can we also land this as a separate patch?
Andrey Kosyakov
Comment 3
2012-12-28 08:00:15 PST
Created
attachment 180876
[details]
Patch
WebKit Review Bot
Comment 4
2012-12-28 08:06:08 PST
Please wait for approval from
abarth@webkit.org
,
dglazkov@chromium.org
,
fishd@chromium.org
,
jamesr@chromium.org
or
tkent@chromium.org
before submitting, as this patch contains changes to the Chromium public API. See also
https://trac.webkit.org/wiki/ChromiumWebKitAPI
.
EFL EWS Bot
Comment 5
2012-12-28 08:07:08 PST
Comment on
attachment 180876
[details]
Patch
Attachment 180876
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/15549833
Early Warning System Bot
Comment 6
2012-12-28 08:07:43 PST
Comment on
attachment 180876
[details]
Patch
Attachment 180876
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/15557772
Build Bot
Comment 7
2012-12-28 08:08:25 PST
Comment on
attachment 180876
[details]
Patch
Attachment 180876
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/15545874
Pavel Feldman
Comment 8
2012-12-28 08:08:59 PST
Comment on
attachment 180876
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=180876&action=review
> Source/WebCore/inspector/TimelineTraceEventProcessor.cpp:200 > + ASSERT_NOT_REACHED();
That should be fine.
Early Warning System Bot
Comment 9
2012-12-28 08:09:53 PST
Comment on
attachment 180876
[details]
Patch
Attachment 180876
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/15549836
Andrey Kosyakov
Comment 10
2012-12-28 08:56:02 PST
Created
attachment 180881
[details]
Patch Trying on bots..
Build Bot
Comment 11
2012-12-28 09:01:15 PST
Comment on
attachment 180881
[details]
Patch
Attachment 180881
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/15582050
kov's GTK+ EWS bot
Comment 12
2012-12-28 09:11:09 PST
Comment on
attachment 180876
[details]
Patch
Attachment 180876
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/15549854
Andrey Kosyakov
Comment 13
2012-12-29 00:48:50 PST
Created
attachment 180922
[details]
Patch Another try on bots..
Andrey Kosyakov
Comment 14
2012-12-29 04:12:12 PST
Created
attachment 180932
[details]
Patch Rebased, trying on bots again..
Andrey Kosyakov
Comment 15
2013-02-01 03:21:54 PST
Created
attachment 186000
[details]
Patch
Early Warning System Bot
Comment 16
2013-02-01 03:38:12 PST
Comment on
attachment 186000
[details]
Patch
Attachment 186000
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/16308579
Early Warning System Bot
Comment 17
2013-02-01 03:40:15 PST
Comment on
attachment 186000
[details]
Patch
Attachment 186000
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/16305575
EFL EWS Bot
Comment 18
2013-02-01 04:08:15 PST
Comment on
attachment 186000
[details]
Patch
Attachment 186000
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/16293592
Build Bot
Comment 19
2013-02-01 04:12:45 PST
Comment on
attachment 186000
[details]
Patch
Attachment 186000
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://queues.webkit.org/results/16301628
WebKit Review Bot
Comment 20
2013-02-01 04:30:17 PST
Comment on
attachment 186000
[details]
Patch
Attachment 186000
[details]
did not pass cr-linux-debug-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/16298575
WebKit Review Bot
Comment 21
2013-02-01 04:47:09 PST
Comment on
attachment 186000
[details]
Patch
Attachment 186000
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/16301636
Andrey Kosyakov
Comment 22
2013-02-01 05:03:34 PST
Created
attachment 186015
[details]
Patch
Early Warning System Bot
Comment 23
2013-02-01 05:15:37 PST
Comment on
attachment 186015
[details]
Patch
Attachment 186015
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/16301659
Early Warning System Bot
Comment 24
2013-02-01 05:17:06 PST
Comment on
attachment 186015
[details]
Patch
Attachment 186015
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/16301660
EFL EWS Bot
Comment 25
2013-02-01 05:17:07 PST
Comment on
attachment 186015
[details]
Patch
Attachment 186015
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/16297656
WebKit Review Bot
Comment 26
2013-02-01 05:31:11 PST
Comment on
attachment 186015
[details]
Patch
Attachment 186015
[details]
did not pass cr-linux-debug-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/16297661
Build Bot
Comment 27
2013-02-01 05:37:20 PST
Comment on
attachment 186015
[details]
Patch
Attachment 186015
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://queues.webkit.org/results/16297666
WebKit Review Bot
Comment 28
2013-02-01 05:39:38 PST
Comment on
attachment 186015
[details]
Patch
Attachment 186015
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/16300602
kov's GTK+ EWS bot
Comment 29
2013-02-01 05:56:17 PST
Comment on
attachment 186015
[details]
Patch
Attachment 186015
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/16301671
Build Bot
Comment 30
2013-02-01 06:01:14 PST
Comment on
attachment 186015
[details]
Patch
Attachment 186015
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/16297675
Peter Beverloo (cr-android ews)
Comment 31
2013-02-01 06:03:58 PST
Comment on
attachment 186015
[details]
Patch
Attachment 186015
[details]
did not pass cr-android-ews (chromium-android): Output:
http://queues.webkit.org/results/16305620
Pavel Feldman
Comment 32
2013-02-01 08:47:33 PST
Comment on
attachment 186015
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=186015&action=review
> Source/WebCore/inspector/InspectorTimelineAgent.cpp:175 > + if (m_client && m_pageAgent)
// Workers case.
> Source/WebCore/inspector/TimelineTraceEventProcessor.cpp:2 > +* Copyright (C) 2012 Google Inc. All rights reserved.
2013
Build Bot
Comment 33
2013-02-01 10:55:14 PST
Comment on
attachment 186015
[details]
Patch
Attachment 186015
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/16293892
Yury Semikhatsky
Comment 34
2013-02-04 04:19:27 PST
Comment on
attachment 186015
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=186015&action=review
> Source/WebCore/inspector/TimelineTraceEventProcessor.cpp:57 > + return &instance;
Is it supposed to be called only on the main thread? If no, the initialization should be guarded with a mutex.
> Source/WebCore/inspector/TimelineTraceEventProcessor.cpp:78 > + m_processors[index] = m_processors.last();
I don't think this place will be a bottleneck and would probably just call remove(index) here.
> Source/WebCore/inspector/TimelineTraceEventProcessor.cpp:142 > + HashMap<String, EventTypeEntry>::iterator it = m_handlersByType.find(name);
How do you know that the processor is not destroyed when processEventOnAnyThread is called from another thread?
> Source/WebCore/inspector/TimelineTraceEventProcessor.h:69 > + bool m_bool;
Add default constructor.
> Source/WebCore/inspector/TimelineTraceEventProcessor.h:90 > + : m_argumentCount(0)
Initialize other parameters?
Yury Semikhatsky
Comment 35
2013-02-04 04:46:10 PST
Comment on
attachment 186015
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=186015&action=review
> Source/WebCore/inspector/TimelineTraceEventProcessor.cpp:92 > + Vector<RefPtr<TimelineTraceEventProcessor> > processors;
Consider passing inlineCapacity = 2
> Source/WebCore/inspector/TimelineTraceEventProcessor.cpp:123 > + static TraceValueUnion missingValue;
const
> Source/WebCore/inspector/TimelineTraceEventProcessor.cpp:190 > + Vector<TraceEvent> events;
ASSERT(isMainThread())
Andrey Kosyakov
Comment 36
2013-02-04 08:24:22 PST
Created
attachment 186381
[details]
Patch
Andrey Kosyakov
Comment 37
2013-02-04 08:29:07 PST
Created
attachment 186384
[details]
Patch
Andrey Kosyakov
Comment 38
2013-02-04 08:38:14 PST
Comment on
attachment 186015
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=186015&action=review
>> Source/WebCore/inspector/InspectorTimelineAgent.cpp:175 >> + if (m_client && m_pageAgent) > > // Workers case.
done.
>> Source/WebCore/inspector/TimelineTraceEventProcessor.cpp:2 >> +* Copyright (C) 2012 Google Inc. All rights reserved. > > 2013
done
>> Source/WebCore/inspector/TimelineTraceEventProcessor.cpp:57 >> + return &instance; > > Is it supposed to be called only on the main thread? If no, the initialization should be guarded with a mutex.
It's guaranteed to be _first_ called on the main thread (we would only subscribe from the main thread).
>> Source/WebCore/inspector/TimelineTraceEventProcessor.cpp:78 >> + m_processors[index] = m_processors.last(); > > I don't think this place will be a bottleneck and would probably just call remove(index) here.
done.
>> Source/WebCore/inspector/TimelineTraceEventProcessor.cpp:92 >> + Vector<RefPtr<TimelineTraceEventProcessor> > processors; > > Consider passing inlineCapacity = 2
done.
>> Source/WebCore/inspector/TimelineTraceEventProcessor.cpp:123 >> + static TraceValueUnion missingValue; > > const
done.
>> Source/WebCore/inspector/TimelineTraceEventProcessor.cpp:142 >> + HashMap<String, EventTypeEntry>::iterator it = m_handlersByType.find(name); > > How do you know that the processor is not destroyed when processEventOnAnyThread is called from another thread?
It's reference counted and one of the copies is held by the caller.
>> Source/WebCore/inspector/TimelineTraceEventProcessor.cpp:190 >> + Vector<TraceEvent> events; > > ASSERT(isMainThread())
done
>> Source/WebCore/inspector/TimelineTraceEventProcessor.h:69 >> + bool m_bool; > > Add default constructor.
done
>> Source/WebCore/inspector/TimelineTraceEventProcessor.h:90 >> + : m_argumentCount(0) > > Initialize other parameters?
Also done for m_name.
Andrey Kosyakov
Comment 39
2013-02-04 08:38:45 PST
Created
attachment 186389
[details]
Patch
Early Warning System Bot
Comment 40
2013-02-04 09:03:26 PST
Comment on
attachment 186389
[details]
Patch
Attachment 186389
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/16370264
Early Warning System Bot
Comment 41
2013-02-04 09:09:14 PST
Comment on
attachment 186389
[details]
Patch
Attachment 186389
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/16377159
Build Bot
Comment 42
2013-02-04 09:13:26 PST
Comment on
attachment 186389
[details]
Patch
Attachment 186389
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://queues.webkit.org/results/16371296
EFL EWS Bot
Comment 43
2013-02-04 09:16:02 PST
Comment on
attachment 186389
[details]
Patch
Attachment 186389
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/16379161
WebKit Review Bot
Comment 44
2013-02-04 09:35:30 PST
Comment on
attachment 186389
[details]
Patch
Attachment 186389
[details]
did not pass cr-linux-debug-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/16375254
WebKit Review Bot
Comment 45
2013-02-04 09:44:04 PST
Comment on
attachment 186389
[details]
Patch
Attachment 186389
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/16369290
Build Bot
Comment 46
2013-02-04 09:47:29 PST
Comment on
attachment 186389
[details]
Patch
Attachment 186389
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/16378177
Peter Beverloo (cr-android ews)
Comment 47
2013-02-04 10:22:07 PST
Comment on
attachment 186389
[details]
Patch
Attachment 186389
[details]
did not pass cr-android-ews (chromium-android): Output:
http://queues.webkit.org/results/16375262
Build Bot
Comment 48
2013-02-04 11:49:37 PST
Comment on
attachment 186389
[details]
Patch
Attachment 186389
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/16374283
Andrey Kosyakov
Comment 49
2013-02-26 04:55:27 PST
Committed
r144041
: <
http://trac.webkit.org/changeset/144041
>
Andrey Kosyakov
Comment 50
2013-02-26 06:24:45 PST
Reverted
r144041
for reason: Broke build Committed
r144053
: <
http://trac.webkit.org/changeset/144053
>
Andrey Kosyakov
Comment 51
2013-02-26 07:02:16 PST
Created
attachment 190277
[details]
EWS run
Andrey Kosyakov
Comment 52
2013-02-26 08:30:53 PST
Committed
r144062
: <
http://trac.webkit.org/changeset/144062
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug