mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-13 20:05:31 +00:00
8214499: SA should follow 8150689
Reviewed-by: dholmes, jgeorge
This commit is contained in:
parent
84cd74b013
commit
a2bbc9c091
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -63,16 +63,16 @@ public class OopUtilities {
|
||||
private static BooleanField threadDaemonField;
|
||||
|
||||
// possible values of java_lang_Thread::ThreadStatus
|
||||
private static int THREAD_STATUS_NEW;
|
||||
public static int THREAD_STATUS_NEW;
|
||||
|
||||
private static int THREAD_STATUS_RUNNABLE;
|
||||
private static int THREAD_STATUS_SLEEPING;
|
||||
private static int THREAD_STATUS_IN_OBJECT_WAIT;
|
||||
private static int THREAD_STATUS_IN_OBJECT_WAIT_TIMED;
|
||||
private static int THREAD_STATUS_PARKED;
|
||||
private static int THREAD_STATUS_PARKED_TIMED;
|
||||
private static int THREAD_STATUS_BLOCKED_ON_MONITOR_ENTER;
|
||||
private static int THREAD_STATUS_TERMINATED;
|
||||
public static int THREAD_STATUS_RUNNABLE;
|
||||
public static int THREAD_STATUS_SLEEPING;
|
||||
public static int THREAD_STATUS_IN_OBJECT_WAIT;
|
||||
public static int THREAD_STATUS_IN_OBJECT_WAIT_TIMED;
|
||||
public static int THREAD_STATUS_PARKED;
|
||||
public static int THREAD_STATUS_PARKED_TIMED;
|
||||
public static int THREAD_STATUS_BLOCKED_ON_MONITOR_ENTER;
|
||||
public static int THREAD_STATUS_TERMINATED;
|
||||
|
||||
// java.util.concurrent.locks.AbstractOwnableSynchronizer fields
|
||||
private static OopField absOwnSyncOwnerThreadField;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -99,13 +99,14 @@ public abstract class JavaVFrame extends VFrame {
|
||||
// we are still waiting for notification or timeout. Otherwise if
|
||||
// we earlier reported java.lang.Thread.State == "BLOCKED (on object
|
||||
// monitor)", then we are actually waiting to re-lock the monitor.
|
||||
// At this level we can't distinguish the two cases to report
|
||||
// "waited on" rather than "waiting on" for the second case.
|
||||
StackValueCollection locs = getLocals();
|
||||
if (!locs.isEmpty()) {
|
||||
StackValue sv = locs.get(0);
|
||||
if (sv.getType() == BasicType.getTObject()) {
|
||||
OopHandle o = sv.getObject();
|
||||
if (OopUtilities.threadOopGetThreadStatus(thread.getThreadObj()) == OopUtilities.THREAD_STATUS_BLOCKED_ON_MONITOR_ENTER) {
|
||||
waitState = "waiting to re-lock in wait()";
|
||||
}
|
||||
printLockedObjectClassName(tty, o, waitState);
|
||||
}
|
||||
} else {
|
||||
@ -146,13 +147,6 @@ public abstract class JavaVFrame extends VFrame {
|
||||
// an inflated monitor that is first on the monitor list in
|
||||
// the first frame can block us on a monitor enter.
|
||||
lockState = identifyLockState(monitor, "waiting to lock");
|
||||
} else if (frameCount != 0) {
|
||||
// This is not the first frame so we either own this monitor
|
||||
// or we owned the monitor before and called wait(). Because
|
||||
// wait() could have been called on any monitor in a lower
|
||||
// numbered frame on the stack, we have to check all the
|
||||
// monitors on the list for this frame.
|
||||
lockState = identifyLockState(monitor, "waiting to re-lock in wait()");
|
||||
}
|
||||
printLockedObjectClassName(tty, monitor.owner(), lockState);
|
||||
foundFirstMonitor = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user