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

Issue 1748953003: - Add assertions in MutexLocker/MonitorLocker to ensure that the code enclosed (Closed)

Created:
4 years, 9 months ago by siva
Modified:
4 years, 9 months ago
Reviewers:
Cutch, srdjan
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 assertions in MutexLocker/MonitorLocker to ensure that the code enclosed in these blocks will not have a safepoint operation - changed boxed_field_list_monitor_ to boxed_field_list_mutex_ as we only need a mutex for guarding access to boxed_field_list_ as changed the lock to use SafepointMutexLocker as the list addition code could potentially allocate and result in GC (safepoint operation) - Added a SafepointMonitorLocker as we have a function Isolate::VisitIsolates which could potentially have safepoints in the enclosed block. - Make the lock around MegamorphicCacheTable::Lookup a SafepointMutexLocker as the look up code seems to be allocating memory while the lock is held. - Changed the ThreadPool and MessageHandler code to account for the new MonitorLocker usage standard - Fixed PortMap::PrintPortsForMessageHandler to use SafepointMutexLocker as the code it encloses calls into Dart - Removed profiler_ field in class Profiler as it doesn't seem to be used. R=johnmccutchan@google.com, srdjan@google.com Committed: https://github.com/dart-lang/sdk/commit/e83151cc77438e5e9a5293eabfb1066cda071ed4

Patch Set 1 #

Patch Set 2 : self-review-comments #

Total comments: 18

Patch Set 3 : code-review-comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+359 lines, -61 lines) Patch
M runtime/vm/dart_api_impl.cc View 1 2 chunks +6 lines, -6 lines 0 comments Download
M runtime/vm/isolate.h View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/isolate.cc View 1 2 11 chunks +27 lines, -11 lines 0 comments Download
M runtime/vm/lockers.h View 1 2 3 chunks +178 lines, -13 lines 0 comments Download
M runtime/vm/lockers.cc View 1 2 2 chunks +59 lines, -13 lines 0 comments Download
M runtime/vm/megamorphic_cache_table.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/message_handler.h View 2 chunks +5 lines, -1 line 0 comments Download
M runtime/vm/message_handler.cc View 9 chunks +11 lines, -10 lines 0 comments Download
M runtime/vm/os_thread.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M runtime/vm/os_thread_android.cc View 1 chunk +16 lines, -0 lines 0 comments Download
M runtime/vm/os_thread_linux.cc View 1 chunk +16 lines, -0 lines 0 comments Download
M runtime/vm/os_thread_macos.cc View 1 chunk +16 lines, -0 lines 0 comments Download
M runtime/vm/os_thread_win.cc View 1 chunk +15 lines, -0 lines 0 comments Download
M runtime/vm/port.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/profiler.h View 1 chunk +0 lines, -1 line 0 comments Download
M runtime/vm/thread_pool.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/thread_test.cc View 1 2 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
siva
4 years, 9 months ago (2016-03-01 00:36:52 UTC) #2
Cutch
https://codereview.chromium.org/1748953003/diff/20001/runtime/vm/lockers.cc File runtime/vm/lockers.cc (right): https://codereview.chromium.org/1748953003/diff/20001/runtime/vm/lockers.cc#newcode82 runtime/vm/lockers.cc:82: SafepointHandler* handler = thread->isolate()->safepoint_handler(); This 'fast update of the ...
4 years, 9 months ago (2016-03-01 15:08:07 UTC) #3
srdjan
lgtm https://codereview.chromium.org/1748953003/diff/20001/runtime/vm/lockers.h File runtime/vm/lockers.h (right): https://codereview.chromium.org/1748953003/diff/20001/runtime/vm/lockers.h#newcode18 runtime/vm/lockers.h:18: * This locker abstraction should only be used ...
4 years, 9 months ago (2016-03-01 16:46:23 UTC) #4
siva
https://codereview.chromium.org/1748953003/diff/20001/runtime/vm/lockers.cc File runtime/vm/lockers.cc (right): https://codereview.chromium.org/1748953003/diff/20001/runtime/vm/lockers.cc#newcode82 runtime/vm/lockers.cc:82: SafepointHandler* handler = thread->isolate()->safepoint_handler(); On 2016/03/01 15:08:07, Cutch wrote: ...
4 years, 9 months ago (2016-03-01 18:59:54 UTC) #5
Cutch
lgtm
4 years, 9 months ago (2016-03-01 19:15:54 UTC) #6
siva
4 years, 9 months ago (2016-03-01 20:33:55 UTC) #8
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
e83151cc77438e5e9a5293eabfb1066cda071ed4 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698