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

Issue 552323002: DevTools: log worker thread ids on the main thread when Timeline recording is enabled (Closed)

Created:
6 years, 3 months ago by yurys
Modified:
6 years, 3 months ago
Reviewers:
caseq, alph, sergeyv, loislo
CC:
blink-reviews, falken, caseq+blink_chromium.org, loislo+blink_chromium.org, eustas+blink_chromium.org, malch+blink_chromium.org, yurys+blink_chromium.org, lushnikov+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, paulirish+reviews_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, kinuko+worker_chromium.org, horo+watch_chromium.org, sergeyv+blink_chromium.org, aandrey+blink_chromium.org
Project:
blink
Visibility:
Public.

Description

DevTools: log worker thread ids on the main thread when Timeline recording is enabled DevTools uses TracingStartedInWorker trace event to figure out which worker threads correspond to the inspected page. The events were written on the worker thread which is racy. Current implementation always writes the event on the main thread. Since Tracing.start/end commands are handled on the main thread this eliminates racy behavior. BUG=401895, 405429 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181820

Patch Set 1 #

Total comments: 7

Patch Set 2 : Addressed comment #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -16 lines) Patch
M LayoutTests/FlakyTests View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/inspector/tracing/worker-events.html View 1 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/inspector/tracing/worker-events-expected.txt View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/inspector/InspectorTraceEvents.h View 1 2 chunks +6 lines, -0 lines 0 comments Download
M Source/core/inspector/InspectorTraceEvents.cpp View 1 2 chunks +9 lines, -0 lines 0 comments Download
M Source/core/workers/WorkerInspectorProxy.cpp View 1 2 chunks +2 lines, -6 lines 0 comments Download
M Source/core/workers/WorkerThread.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/workers/WorkerThread.cpp View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M Source/devtools/front_end/timeline/TracingModel.js View 1 2 5 chunks +16 lines, -3 lines 0 comments Download
M Source/devtools/front_end/timeline/TracingTimelineModel.js View 1 2 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (4 generated)
yurys
6 years, 3 months ago (2014-09-09 13:40:36 UTC) #2
loislo
https://codereview.chromium.org/552323002/diff/1/Source/core/inspector/InspectorTraceEvents.cpp File Source/core/inspector/InspectorTraceEvents.cpp (right): https://codereview.chromium.org/552323002/diff/1/Source/core/inspector/InspectorTraceEvents.cpp#newcode363 Source/core/inspector/InspectorTraceEvents.cpp:363: value->setDouble("workerThreadId", workerThread->platformThreadId()); do we have a guaranty that workerThread ...
6 years, 3 months ago (2014-09-09 13:59:44 UTC) #3
yurys
https://codereview.chromium.org/552323002/diff/1/Source/core/inspector/InspectorTraceEvents.cpp File Source/core/inspector/InspectorTraceEvents.cpp (right): https://codereview.chromium.org/552323002/diff/1/Source/core/inspector/InspectorTraceEvents.cpp#newcode363 Source/core/inspector/InspectorTraceEvents.cpp:363: value->setDouble("workerThreadId", workerThread->platformThreadId()); On 2014/09/09 13:59:44, loislo wrote: > do ...
6 years, 3 months ago (2014-09-09 14:04:28 UTC) #4
loislo
https://codereview.chromium.org/552323002/diff/1/Source/core/inspector/InspectorTraceEvents.cpp File Source/core/inspector/InspectorTraceEvents.cpp (right): https://codereview.chromium.org/552323002/diff/1/Source/core/inspector/InspectorTraceEvents.cpp#newcode363 Source/core/inspector/InspectorTraceEvents.cpp:363: value->setDouble("workerThreadId", workerThread->platformThreadId()); On 2014/09/09 14:04:27, yurys wrote: > On ...
6 years, 3 months ago (2014-09-09 14:14:08 UTC) #5
yurys
https://codereview.chromium.org/552323002/diff/1/Source/core/workers/WorkerInspectorProxy.cpp File Source/core/workers/WorkerInspectorProxy.cpp (right): https://codereview.chromium.org/552323002/diff/1/Source/core/workers/WorkerInspectorProxy.cpp#newcode94 Source/core/workers/WorkerInspectorProxy.cpp:94: TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "TracingStartedInWorker", "data", InspectorTracingStartedInWorkerEvent::data(sessionId, m_workerThread)); On 2014/09/09 13:59:44, loislo ...
6 years, 3 months ago (2014-09-09 14:46:34 UTC) #6
loislo
lgtm
6 years, 3 months ago (2014-09-09 14:47:00 UTC) #7
yurys
https://codereview.chromium.org/552323002/diff/1/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/552323002/diff/1/Source/core/workers/WorkerThread.cpp#newcode241 Source/core/workers/WorkerThread.cpp:241: if (!m_thread) On 2014/09/09 13:59:44, loislo wrote: > Looks ...
6 years, 3 months ago (2014-09-09 15:08:37 UTC) #8
yurys
Waiting for https://codereview.chromium.org/515243002/ to land as this CL depends on it.
6 years, 3 months ago (2014-09-09 15:09:40 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/552323002/20001
6 years, 3 months ago (2014-09-11 12:15:25 UTC) #11
commit-bot: I haz the power
Failed to apply patch for Source/devtools/front_end/sdk/TracingModel.js: While running patch -p1 --forward --force --no-backup-if-mismatch; can't find ...
6 years, 3 months ago (2014-09-11 12:15:39 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/552323002/40001
6 years, 3 months ago (2014-09-11 12:24:27 UTC) #15
commit-bot: I haz the power
6 years, 3 months ago (2014-09-11 13:27:10 UTC) #16
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as 181820

Powered by Google App Engine
This is Rietveld 408576698