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

Issue 1439483003: - Add an OSThread structure which is the generic TLS structure for all C++ (Closed)

Created:
5 years, 1 month ago by siva
Modified:
5 years, 1 month ago
Reviewers:
zra, Cutch, 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

- Add an OSThread structure which is the generic TLS structure for all C++ fields in a thread (i.e fields that are not Dart VM related) - Split the Thread structure to be a pure Dart per thread structure and add a pointer to os_thread which points to the OSThread structure - Change Schedule/UnSchedule to set the Dart Thread structure as the TLS of the thread when it is inside the Dart world and reset the TLS back to the OSThread strcuture when is exits the Dart World. - Moved the stack_base and few stack size related functions to OSThread from Isolate R=johnmccutchan@google.com, zra@google.com Committed: https://github.com/dart-lang/sdk/commit/9e19d236ca83136d49cf54f38a8b551927be70bf

Patch Set 1 #

Patch Set 2 : self-review-comments #

Patch Set 3 : more-refactoring #

Patch Set 4 : more_cleanup #

Patch Set 5 : other-host-archs #

Patch Set 6 : move-os-thread #

Patch Set 7 : fix-tests #

Patch Set 8 : self-code-review #

Patch Set 9 : tweak-comment #

Total comments: 8

Patch Set 10 : code-review-comments #

Total comments: 10

Patch Set 11 : code-review-comments #

Total comments: 2

Patch Set 12 : address-comments #

Total comments: 14

Patch Set 13 : code-review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+941 lines, -892 lines) Patch
M runtime/lib/timeline.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +9 lines, -3 lines 0 comments Download
M runtime/vm/dart.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +12 lines, -10 lines 0 comments Download
M runtime/vm/dart_api_impl.h View 1 2 1 chunk +0 lines, -17 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 2 chunks +6 lines, -8 lines 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/dart_entry.cc View 1 2 3 4 5 6 7 8 3 chunks +27 lines, -15 lines 0 comments Download
M runtime/vm/debugger_api_impl_test.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/isolate.h View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +4 lines, -12 lines 0 comments Download
M runtime/vm/isolate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +6 lines, -32 lines 0 comments Download
M runtime/vm/log.cc View 1 chunk +3 lines, -1 line 0 comments Download
M runtime/vm/message_handler_test.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/native_api_impl.cc View 1 2 3 chunks +21 lines, -2 lines 0 comments Download
M runtime/vm/os_thread.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +194 lines, -12 lines 0 comments Download
A runtime/vm/os_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +231 lines, -0 lines 0 comments Download
M runtime/vm/os_thread_android.cc View 1 2 3 4 5 6 4 chunks +15 lines, -4 lines 0 comments Download
M runtime/vm/os_thread_linux.cc View 1 2 3 4 5 6 4 chunks +15 lines, -4 lines 0 comments Download
M runtime/vm/os_thread_macos.cc View 1 2 3 4 5 6 4 chunks +15 lines, -4 lines 0 comments Download
M runtime/vm/os_thread_win.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +18 lines, -4 lines 0 comments Download
M runtime/vm/profiler.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +16 lines, -18 lines 0 comments Download
M runtime/vm/simulator_arm.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/simulator_arm64.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/simulator_mips.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/stack_frame.cc View 1 2 3 4 5 2 chunks +3 lines, -4 lines 0 comments Download
M runtime/vm/thread.h View 1 2 3 4 5 6 7 8 9 10 11 16 chunks +71 lines, -159 lines 0 comments Download
M runtime/vm/thread.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +48 lines, -327 lines 0 comments Download
M runtime/vm/thread_interrupter.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/thread_interrupter.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -4 lines 0 comments Download
M runtime/vm/thread_interrupter_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/thread_interrupter_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/thread_interrupter_macos.cc View 1 2 3 4 5 6 7 8 9 2 chunks +1 line, -2 lines 0 comments Download
M runtime/vm/thread_interrupter_win.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +13 lines, -8 lines 0 comments Download
M runtime/vm/thread_pool.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +13 lines, -8 lines 0 comments Download
M runtime/vm/thread_registry.h View 1 2 3 4 5 6 7 3 chunks +20 lines, -139 lines 0 comments Download
M runtime/vm/thread_registry.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +122 lines, -49 lines 0 comments Download
M runtime/vm/thread_test.cc View 1 2 3 4 6 chunks +13 lines, -12 lines 0 comments Download
M runtime/vm/timeline.cc View 1 2 3 4 5 6 7 8 9 10 10 chunks +17 lines, -17 lines 0 comments Download
M runtime/vm/timeline_test.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -2 lines 0 comments Download
M runtime/vm/vm_sources.gypi View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 15 (2 generated)
siva
5 years, 1 month ago (2015-11-13 22:00:27 UTC) #3
Cutch
https://codereview.chromium.org/1439483003/diff/150001/runtime/vm/os_thread.cc File runtime/vm/os_thread.cc (right): https://codereview.chromium.org/1439483003/diff/150001/runtime/vm/os_thread.cc#newcode41 runtime/vm/os_thread.cc:41: ASSERT(Timeline::recorder() != NULL); Replace the ASSERT with: if (Timeline::recorder() ...
5 years, 1 month ago (2015-11-14 00:31:56 UTC) #4
siva
https://codereview.chromium.org/1439483003/diff/150001/runtime/vm/os_thread.cc File runtime/vm/os_thread.cc (right): https://codereview.chromium.org/1439483003/diff/150001/runtime/vm/os_thread.cc#newcode41 runtime/vm/os_thread.cc:41: ASSERT(Timeline::recorder() != NULL); On 2015/11/14 00:31:56, Cutch wrote: > ...
5 years, 1 month ago (2015-11-14 01:38:26 UTC) #5
zra
https://codereview.chromium.org/1439483003/diff/170001/runtime/vm/os_thread.cc File runtime/vm/os_thread.cc (right): https://codereview.chromium.org/1439483003/diff/170001/runtime/vm/os_thread.cc#newcode107 runtime/vm/os_thread.cc:107: Does thread need to be deleted? After that, I ...
5 years, 1 month ago (2015-11-16 20:12:28 UTC) #6
siva
Addressed comments, PTAL. https://codereview.chromium.org/1439483003/diff/170001/runtime/vm/os_thread.cc File runtime/vm/os_thread.cc (right): https://codereview.chromium.org/1439483003/diff/170001/runtime/vm/os_thread.cc#newcode107 runtime/vm/os_thread.cc:107: On 2015/11/16 20:12:28, zra wrote: > ...
5 years, 1 month ago (2015-11-17 20:52:25 UTC) #7
Cutch
https://codereview.chromium.org/1439483003/diff/190001/runtime/vm/thread_interrupter_win.cc File runtime/vm/thread_interrupter_win.cc (right): https://codereview.chromium.org/1439483003/diff/190001/runtime/vm/thread_interrupter_win.cc#newcode58 runtime/vm/thread_interrupter_win.cc:58: Thread* thread = Thread::Current(); On Windows this is running ...
5 years, 1 month ago (2015-11-17 23:19:01 UTC) #8
siva
Addressed windows profiler issue. PTAL. https://codereview.chromium.org/1439483003/diff/190001/runtime/vm/thread_interrupter_win.cc File runtime/vm/thread_interrupter_win.cc (right): https://codereview.chromium.org/1439483003/diff/190001/runtime/vm/thread_interrupter_win.cc#newcode58 runtime/vm/thread_interrupter_win.cc:58: Thread* thread = Thread::Current(); ...
5 years, 1 month ago (2015-11-18 20:25:10 UTC) #9
Cutch
lgtm
5 years, 1 month ago (2015-11-18 22:30:53 UTC) #10
zra
lgtm
5 years, 1 month ago (2015-11-18 22:40:36 UTC) #11
Ivan Posva
DBC -ip https://codereview.chromium.org/1439483003/diff/210001/runtime/vm/dart_entry.cc File runtime/vm/dart_entry.cc (right): https://codereview.chromium.org/1439483003/diff/210001/runtime/vm/dart_entry.cc#newcode53 runtime/vm/dart_entry.cc:53: saved_stack_limit_ = isolate->saved_stack_limit(); Please add a TODO ...
5 years, 1 month ago (2015-11-19 06:23:24 UTC) #12
Cutch
https://codereview.chromium.org/1439483003/diff/210001/runtime/vm/isolate.cc File runtime/vm/isolate.cc (right): https://codereview.chromium.org/1439483003/diff/210001/runtime/vm/isolate.cc#newcode802 runtime/vm/isolate.cc:802: // to move to the OSThread structure. On 2015/11/19 ...
5 years, 1 month ago (2015-11-19 15:12:21 UTC) #13
siva
https://codereview.chromium.org/1439483003/diff/210001/runtime/vm/dart_entry.cc File runtime/vm/dart_entry.cc (right): https://codereview.chromium.org/1439483003/diff/210001/runtime/vm/dart_entry.cc#newcode53 runtime/vm/dart_entry.cc:53: saved_stack_limit_ = isolate->saved_stack_limit(); On 2015/11/19 06:23:23, Ivan Posva wrote: ...
5 years, 1 month ago (2015-11-19 20:54:05 UTC) #14
siva
5 years, 1 month ago (2015-11-19 21:45:14 UTC) #15
Message was sent while issue was closed.
Committed patchset #13 (id:230001) manually as
9e19d236ca83136d49cf54f38a8b551927be70bf (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698