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

Issue 1514653002: - Assert that we do not hold the timeline lock while entering (Closed)

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

Description

- Assert that we do not hold the timeline lock while entering potential safepoints. - Enable timeline for existing test as a regression test. - Fix allocation with timeline lock held during deoptimization to prevent deadlock. BUG= R=rmacnak@google.com Committed: https://github.com/dart-lang/sdk/commit/f887b03b5b21735a292ef599d132568b661ce29b

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -52 lines) Patch
M runtime/vm/deopt_instructions.h View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/deopt_instructions.cc View 3 chunks +24 lines, -27 lines 0 comments Download
M runtime/vm/timeline.h View 3 chunks +19 lines, -10 lines 0 comments Download
M runtime/vm/timeline.cc View 5 chunks +31 lines, -13 lines 0 comments Download
M tests/standalone/array_bounds_check_generalization_test.dart View 1 chunk +3 lines, -1 line 1 comment Download

Messages

Total messages: 9 (2 generated)
Ivan Posva
5 years ago (2015-12-09 20:08:02 UTC) #2
rmacnak
On 2015/12/09 20:08:02, Ivan Posva wrote: LGTM (+ John's LGTM on email but not on ...
5 years ago (2015-12-09 21:40:05 UTC) #3
Ivan Posva
Committed patchset #1 (id:1) manually as f887b03b5b21735a292ef599d132568b661ce29b (presubmit successful).
5 years ago (2015-12-09 21:41:47 UTC) #5
Florian Schneider
This seems still fragile to me: Couldn't the same issue arise for any other two ...
5 years ago (2015-12-10 17:01:46 UTC) #6
rmacnak
On 2015/12/10 17:01:46, Florian Schneider wrote: > This seems still fragile to me: Couldn't the ...
5 years ago (2015-12-10 17:18:21 UTC) #7
Florian Schneider
On 2015/12/10 17:18:21, rmacnak wrote: > On 2015/12/10 17:01:46, Florian Schneider wrote: > > This ...
5 years ago (2015-12-10 17:52:49 UTC) #8
Ivan Posva
5 years ago (2015-12-10 18:07:21 UTC) #9
Message was sent while issue was closed.
On 2015/12/10 17:52:49, Florian Schneider wrote:
> On 2015/12/10 17:18:21, rmacnak wrote:
> > On 2015/12/10 17:01:46, Florian Schneider wrote:
> > > This seems still fragile to me: Couldn't the same issue arise for any
other
> > two
> > > TimelineDurationScopes (e.g. not involving GC)?
> > 
> > TimelineDurationScope only holds the lock in its destructor, not for its
whole
> > lifetime.
> >
> 
> Oh, yes right. Wouldn't it then be nicer to use TimelineDurationScope in
> DeoptContext as well?

Except the TimelineDurationScope is a StackObject and deoptimization takes
several phases, so the DeoptContext needs to manually emulate what the
TimelineDurationScope convenience class does for you in the generally applicable
case.

-Ivan

>  
> > 
> > >
> >
>
https://codereview.chromium.org/1514653002/diff/1/tests/standalone/array_boun...
> > > File tests/standalone/array_bounds_check_generalization_test.dart (right):
> > > 
> > >
> >
>
https://codereview.chromium.org/1514653002/diff/1/tests/standalone/array_boun...
> > > tests/standalone/array_bounds_check_generalization_test.dart:7: //
> > > VMOptions=--optimization_counter_threshold=10 --no-use-osr
> --complete-timeline
> > > Could you reproduce the deadlock with this test? I could not.

Powered by Google App Engine
This is Rietveld 408576698