RFR: 8255381: com/sun/jdi/EATests.java should not suspend graal threads [v2]
Richard Reingruber
rrich at openjdk.java.net
Tue Dec 8 13:45:26 UTC 2020
On Mon, 7 Dec 2020 20:48:16 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> Richard Reingruber has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Changes based on Chris Plummer's feedback.
>
> test/jdk/com/sun/jdi/EATests.java line 1274:
>
>> 1272: o = getLocalRef(env.targetMainThread.frame(0), XYVAL_NAME, "xy");
>> 1273: } catch (Exception e) {
>> 1274: msg("The local variable xy is out of scope because we suspended at the wrong bci. Resume and try again! (" + (++retryCount) + ")");
>
> Please move the increment of retryCount to before the msg() call for clarify.
Sure.
> test/jdk/com/sun/jdi/EATests.java line 1275:
>
>> 1273: } catch (Exception e) {
>> 1274: msg("The local variable xy is out of scope because we suspended at the wrong bci. Resume and try again! (" + (++retryCount) + ")");
>> 1275: env.vm().resume();
>
> You are calling `VM.resume()` in a loop, yet you are suspending using `ThreadReference.suspend()`. Although the it looks like this will work, it seems that calling `ThreadReference.resume()` would be more appropriate.
Ok, that's probably better.
(I wanted to follow the principle to always resume _all_ threads)
-------------
PR: https://git.openjdk.java.net/jdk/pull/1625
More information about the hotspot-compiler-dev
mailing list