Bug 94125 - Web Inspector: enable instrumentation of platform code
Summary: Web Inspector: enable instrumentation of platform code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Andrey Kosyakov
URL:
Keywords:
Depends on:
Blocks: 90277
  Show dependency treegraph
 
Reported: 2012-08-15 10:54 PDT by Andrey Kosyakov
Modified: 2012-08-16 05:07 PDT (History)
14 users (show)

See Also:


Attachments
Patch (27.85 KB, patch)
2012-08-15 11:03 PDT, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
Patch (32.30 KB, patch)
2012-08-16 02:24 PDT, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
Patch (36.58 KB, patch)
2012-08-16 04:50 PDT, Andrey Kosyakov
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kosyakov 2012-08-15 10:54:35 PDT
Currently, we use InspectorInstrumentation as the interface that is used by inspector to instrument. This can't be used to instrument code under WebCore/platform, though, as this is deemed to be a layering violation. So let's add a lower-level instrumentation interface and implement its client within the inspector.
Comment 1 Andrey Kosyakov 2012-08-15 11:03:48 PDT
Created attachment 158595 [details]
Patch
Comment 2 Nat Duca 2012-08-15 11:30:07 PDT
Comment on attachment 158595 [details]
Patch

This looks great.
Comment 3 Build Bot 2012-08-15 12:15:13 PDT
Comment on attachment 158595 [details]
Patch

Attachment 158595 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/13509282
Comment 4 Andrey Kosyakov 2012-08-16 02:24:55 PDT
Created attachment 158756 [details]
Patch
Comment 5 Pavel Feldman 2012-08-16 03:34:21 PDT
Comment on attachment 158756 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=158756&action=review

Minor nits, otherwise looks good.

> Source/WebCore/inspector/InspectorTimelineAgent.cpp:-491
> -            InspectorInstrumentation::setTimelineAgentForOrphanEvents(0);

You should remove
InspectorInstrumentation::setTimelineAgentForOrphanEvents, InspectorInstrumentation::threadSpecificTimelineAgentForOrphanEvents, etc. as well

> Source/WebCore/inspector/InspectorTimelineAgent.cpp:556
> +        m_platformInstrumentationClientSet = m_recordStack.size();

m_platformInstrumentationClientInstalledAtStackDepth

> Source/WebCore/platform/PlatformInstrumentation.h:46
> +    virtual void willDecodeImage(const WTF::String& imageType) = 0;

Here and below drop WTF::

> Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:265
> +    if (frame.status() != ImageFrame::FrameComplete) {

You did not remove TRACE_EVENT macro / include.
Comment 6 Andrey Kosyakov 2012-08-16 04:50:32 PDT
Created attachment 158775 [details]
Patch
Comment 7 Andrey Kosyakov 2012-08-16 05:07:00 PDT
Committed r125769: <http://trac.webkit.org/changeset/125769>