Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Issue 2746153005: DevTools: move flow events tracking to TracingModel, support cross-threads case (Closed)

Created:
3 years, 9 months ago by caseq
Modified:
3 years, 9 months ago
Reviewers:
alph, pfeldman
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, kozyatinskiy+blink_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: move flow events tracking to TracingModel, support cross-threads case This implements support for tracking flow events in TracingModel and correctly supports the spec in terms of id matching for flow events. Review-Url: https://codereview.chromium.org/2746153005 Cr-Commit-Position: refs/heads/master@{#457245} Committed: https://chromium.googlesource.com/chromium/src/+/56024c61ffdabb977c7645098cb4654c6a1fdcc1

Patch Set 1 #

Total comments: 1

Patch Set 2 : review comments addressed #

Patch Set 3 : fixed infinite chains of flow events #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+172 lines, -55 lines) Patch
A third_party/WebKit/LayoutTests/inspector/tracing-model-flow.html View 1 chunk +68 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/inspector/tracing-model-flow-expected.txt View 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js View 2 chunks +3 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js View 7 chunks +51 lines, -1 line 3 comments Download
M third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js View 1 2 7 chunks +35 lines, -49 lines 1 comment Download

Messages

Total messages: 17 (6 generated)
caseq
3 years, 9 months ago (2017-03-15 19:06:01 UTC) #2
alph
Thanks! lgtm https://codereview.chromium.org/2746153005/diff/1/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js File third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js (right): https://codereview.chromium.org/2746153005/diff/1/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js#newcode455 third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js:455: for (; flowEvent; flowEvent = flowEvent.nextFlow) { ...
3 years, 9 months ago (2017-03-15 19:31:48 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2746153005/20001
3 years, 9 months ago (2017-03-15 20:48:27 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/56024c61ffdabb977c7645098cb4654c6a1fdcc1
3 years, 9 months ago (2017-03-15 22:47:07 UTC) #10
pfeldman
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/2750133003/ by pfeldman@chromium.org. ...
3 years, 9 months ago (2017-03-16 01:13:55 UTC) #11
pfeldman
https://codereview.chromium.org/2746153005/diff/40001/third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js File third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js (right): https://codereview.chromium.org/2746153005/diff/40001/third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js#newcode363 third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js:363: this._flowHeads.push(e); So if there is no begin, you still ...
3 years, 9 months ago (2017-03-16 02:00:22 UTC) #12
caseq
On 2017/03/16 02:00:22, pfeldman_slow wrote: > https://codereview.chromium.org/2746153005/diff/40001/third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js > File third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js (right): > > https://codereview.chromium.org/2746153005/diff/40001/third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js#newcode363 > ...
3 years, 9 months ago (2017-03-16 02:05:00 UTC) #13
pfeldman
https://codereview.chromium.org/2746153005/diff/40001/third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js File third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js (right): https://codereview.chromium.org/2746153005/diff/40001/third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js#newcode249 third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js:249: var key = `${event.categoriesString}-${event.name}-${event.id}`; I don't think categoriesString and ...
3 years, 9 months ago (2017-03-16 07:03:50 UTC) #14
caseq
On 2017/03/16 07:03:50, pfeldman_slow wrote: > https://codereview.chromium.org/2746153005/diff/40001/third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js > File third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js (right): > > https://codereview.chromium.org/2746153005/diff/40001/third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js#newcode249 > ...
3 years, 9 months ago (2017-03-16 16:59:19 UTC) #15
pfeldman
> The remaining added complexity is to support the flow events in a generic way ...
3 years, 9 months ago (2017-03-16 21:04:11 UTC) #16
caseq
3 years, 9 months ago (2017-03-16 21:17:40 UTC) #17
Message was sent while issue was closed.
On 2017/03/16 21:04:11, pfeldman_slow wrote:
> > The remaining added complexity is to support the flow events in a generic
way
> in
> > compliance to Trace Event format spec
> 
> I don't think the spec is practically useful here - we need our own treatment
> for flows. I'd like to see flows as an aspect of trace events and tracing is
> currently confusing ids, bind_ids and phases with that regard. It also does
not
> support certain capabilities such as 'canceling' an async event. Maybe that is
> why trace viewer clients I spoke so far with avoid using it.

We shouldn't use flow events for the purpose of async instrumentation then.
Abusing existent events with well-specified handling rules by introducing
incompatible rules does not make sense.

> > -- your implementation does not handle cross-thread events properly and does
> not follow the spec in terms of handling ids.
> 
> We don't yet have cross-thread async traceability and have no design for its
> instrumentation so far.

Right, but we do have cross-thread flow events.

> The strength of the tracing is being a collection of primitive events that are
> easy to iterate. The flow analysis capabilities that we will need in the
future
> include tree shaking - figuring out flow implications of a particular node in
> the trace. We will need a separate model for that on top of trace events that
> would perceive them as a graph and allow efficient flow analysis. When we have
a
> good idea on what we need from it _and_ we know whether we are using flow
events
> or any other markup for our flow, we can start doing something like the patch
> you suggest.

There are well defined rules how flow events "bind" to other trace events and
from what I can see this could work reasonably well for our use cases. My next
step was actually to implement these bindings in the tracing model and return
"bound" event for each flow event, which would make flamechart visualization
make more sense (compared to having arrows handing in the air).

Powered by Google App Engine
This is Rietveld 408576698