Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 75280 - Integrate monitor information in debug view
Summary: Integrate monitor information in debug view
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.1 M3   Edit
Assignee: Jared Burns CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 51884
Blocks:
  Show dependency tree
 
Reported: 2004-09-29 09:52 EDT by Darin Wright CLA
Modified: 2004-10-19 11:28 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2004-09-29 09:52:38 EDT
Show monitor information inline in the debug view. The information can be 
turned on/off via a toggle in the view menu "Show Monitor Information". When a 
thread suspends (and the toggle is on), the first children of a thread will be 
the "owned" monitors (if any) and "waiting for" monitor (if one).

An owned monitor can be expanded to show any threads waiting for the monitor 
(in contention), and the "waiting for" monitor can be expanded to show its 
owning thread. Those objects can be recursively expanded to show owned 
monitors, etc.

When a thread suspends its icon overlay can show if it is in contention or in 
a deadlock. Threads in a deadlock should be emphasized in the UI.

Migrating the information to the debug view will make the Threads and Monitors 
view obsolete.
Comment 1 Luc Bourlier CLA 2004-10-12 19:53:45 EDT
Implemented.

I created a thread & monitor model which represents the current state on the VM.
A second model is used to display the information, the debug view and the tree
viewer have problems when the same object is display multiple time. The second
model create a new object every time a thread or a monitor has to be displayed.
The main entry point is the ThreadMonitorManager, which returns the owned and
contended monitors for an IJavaThread.
I added an action in the drop-down menu of the debug view to turn the thread and
monitor support on and off.

LaunchViewEventHandler - fixed so the debug view is correctly refresh for debug
change event on any element.
IJavaObject - added getWaitingThreads() and getOwningThread() to access the
monitor information.
LogicalObjectStructureValue, JDIObjectValue - implemented the 2 new methods.
JDIDebugTarget - added getJDIThread(), to get the JDIThread from a
ThreadReference object.

JavaDebugContentProvider - updated to return the threads and monitors
information if requiered.
ThreadMonitorManager - main entry point for the threads and monitors model
JavaMonitor, JavaMonitorThread - threads and monitors model.
JavaContendedMonitor, JavaOwnedMonitor, JavaWaitingThread, JavaOwningThread -
display model.
JDIModelPresentation - updated to correctly display the new elements.

IJDIPreferenceConstants, JDIDebugUIPreferenceInitializer - added a preference
constant and set its default value.
ShowMonitorThreadInformation - toggle action to turn the threads and monitors
support on and off.
thread_and_monitor_obj.gif - icon for the toggle action.
plugin.xml, plugin.properties - added the new action
Comment 2 Luc Bourlier CLA 2004-10-12 19:54:33 EDT
Please verify, Jared.
Comment 3 Jared Burns CLA 2004-10-18 18:33:07 EDT
Verified.