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

Issue 1412733008: Switch profiler from isolates to threads (Closed)

Created:
5 years, 2 months ago by Cutch
Modified:
5 years, 1 month ago
Reviewers:
siva, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Switch profiler from isolates to threads - API breakage: Dart_IsolateBlocked, Dart_IsolateUnblocked -> Dart_ThreadDisableProfiling, Dart_ThreadEnableProfiling. - Remove IsolateProfilerData. - Move thread at blocking call count from isolate to thread. - Always interrupt threads unless they are blocked. - We can no longer count "idle" ticks. - Only record sample if thread is the current mutator of an isolate. - Refactor ThreadInterrupterCallback to ensure that Thread* is valid. Threads are only ever sent signals if ThreadInterruptsEnabled is true. Which is controlled by two functions: void DisableThreadInterrupts(); void EnableThreadInterrupts(); R=asiva@google.com, iposva@google.com Committed: https://github.com/dart-lang/sdk/commit/6365c27f81c02605ac9d9ec879022ceacc0bdea8

Patch Set 1 #

Patch Set 2 : #

Total comments: 17

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Total comments: 16

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Total comments: 16

Patch Set 15 : #

Patch Set 16 : #

Total comments: 6

Patch Set 17 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+232 lines, -555 lines) Patch
M runtime/bin/dartutils.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/include/dart_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +15 lines, -4 lines 0 comments Download
M runtime/tests/vm/vm.status View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -17 lines 0 comments Download
M runtime/vm/dart.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -3 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +8 lines, -12 lines 0 comments Download
M runtime/vm/debugger.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -6 lines 0 comments Download
M runtime/vm/isolate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +0 lines, -18 lines 0 comments Download
M runtime/vm/isolate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +0 lines, -58 lines 0 comments Download
M runtime/vm/message_handler.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/profiler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -38 lines 0 comments Download
M runtime/vm/profiler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 14 chunks +40 lines, -176 lines 0 comments Download
M runtime/vm/profiler_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +15 lines, -32 lines 0 comments Download
M runtime/vm/profiler_test.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/stub_code.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/stub_code.cc View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download
M runtime/vm/thread.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +21 lines, -9 lines 0 comments Download
M runtime/vm/thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +52 lines, -26 lines 0 comments Download
M runtime/vm/thread_interrupter.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +1 line, -9 lines 0 comments Download
M runtime/vm/thread_interrupter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +36 lines, -39 lines 0 comments Download
M runtime/vm/thread_interrupter_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +4 lines, -8 lines 0 comments Download
M runtime/vm/thread_interrupter_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +5 lines, -8 lines 0 comments Download
M runtime/vm/thread_interrupter_macos.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +5 lines, -8 lines 0 comments Download
M runtime/vm/thread_interrupter_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -66 lines 0 comments Download
M runtime/vm/thread_interrupter_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +2 lines, -6 lines 0 comments Download
M runtime/vm/thread_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -3 lines 0 comments Download
M runtime/vm/vm_sources.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 24 (8 generated)
Cutch
5 years, 2 months ago (2015-10-22 23:37:57 UTC) #5
Cutch
+iposva
5 years, 2 months ago (2015-10-23 18:41:49 UTC) #7
siva
I have one global question, we have a thread registry which tracks all threads that ...
5 years, 1 month ago (2015-10-26 23:45:26 UTC) #9
Cutch
https://codereview.chromium.org/1412733008/diff/20001/runtime/include/dart_api.h File runtime/include/dart_api.h (right): https://codereview.chromium.org/1412733008/diff/20001/runtime/include/dart_api.h#newcode1015 runtime/include/dart_api.h:1015: DART_EXPORT void Dart_ThreadBlocked(); On 2015/10/26 23:45:26, siva wrote: > ...
5 years, 1 month ago (2015-10-27 22:36:24 UTC) #12
Cutch
A couple comments got lost somehow: 1) As discussed offline. The thread interrupter could be ...
5 years, 1 month ago (2015-10-27 22:47:50 UTC) #13
Ivan Posva
Sending out my pending comments. Not sure how many still apply after the patches... -Ivan ...
5 years, 1 month ago (2015-10-28 06:45:16 UTC) #14
Ivan Posva
I am not 100% convinced how this wakes up from "deep sleep". -Ivan https://codereview.chromium.org/1412733008/diff/160001/runtime/vm/dart.cc File ...
5 years, 1 month ago (2015-10-28 08:27:47 UTC) #15
Cutch
https://codereview.chromium.org/1412733008/diff/160001/runtime/vm/dart.cc File runtime/vm/dart.cc (left): https://codereview.chromium.org/1412733008/diff/160001/runtime/vm/dart.cc#oldcode301 runtime/vm/dart.cc:301: Profiler::InitProfilingForIsolate(I); On 2015/10/28 08:27:47, Ivan Posva wrote: > There ...
5 years, 1 month ago (2015-10-28 14:39:19 UTC) #16
Cutch
PTAL at Patch Set 12. Threads no longer receive interrupts by default. Thread::EnterIsolate Thread::EnterIsolateAsHelper Enable ...
5 years, 1 month ago (2015-10-28 14:57:52 UTC) #17
Ivan Posva
https://codereview.chromium.org/1412733008/diff/240001/runtime/vm/isolate.h File runtime/vm/isolate.h (right): https://codereview.chromium.org/1412733008/diff/240001/runtime/vm/isolate.h#newcode310 runtime/vm/isolate.h:310: bool HasDebugger() const { Still needed? https://codereview.chromium.org/1412733008/diff/240001/runtime/vm/profiler.cc File runtime/vm/profiler.cc ...
5 years, 1 month ago (2015-10-28 19:31:54 UTC) #18
Cutch
https://codereview.chromium.org/1412733008/diff/240001/runtime/vm/isolate.h File runtime/vm/isolate.h (right): https://codereview.chromium.org/1412733008/diff/240001/runtime/vm/isolate.h#newcode310 runtime/vm/isolate.h:310: bool HasDebugger() const { On 2015/10/28 19:31:53, Ivan Posva ...
5 years, 1 month ago (2015-10-28 19:50:34 UTC) #19
Cutch
*ping*
5 years, 1 month ago (2015-10-29 20:01:05 UTC) #20
Ivan Posva
LGTM -ip
5 years, 1 month ago (2015-10-29 21:45:05 UTC) #21
siva
lgtm https://chromiumcodereview.appspot.com/1412733008/diff/280001/runtime/vm/thread_interrupter.cc File runtime/vm/thread_interrupter.cc (right): https://chromiumcodereview.appspot.com/1412733008/diff/280001/runtime/vm/thread_interrupter.cc#newcode197 runtime/vm/thread_interrupter.cc:197: // Now that we have the lock, check ...
5 years, 1 month ago (2015-10-29 21:47:41 UTC) #22
Cutch
https://codereview.chromium.org/1412733008/diff/280001/runtime/vm/thread_interrupter.cc File runtime/vm/thread_interrupter.cc (right): https://codereview.chromium.org/1412733008/diff/280001/runtime/vm/thread_interrupter.cc#newcode197 runtime/vm/thread_interrupter.cc:197: // Now that we have the lock, check if ...
5 years, 1 month ago (2015-11-02 20:47:12 UTC) #23
Cutch
5 years, 1 month ago (2015-11-02 20:47:57 UTC) #24
Message was sent while issue was closed.
Committed patchset #17 (id:300001) manually as
6365c27f81c02605ac9d9ec879022ceacc0bdea8 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698