# Hotspot SA User Interface Notes

## Workspace and Building

All the source code for the Serviceability Agent is in `src/share/vm/agent` in the HotSport workspace `/net/jano.sfbay/export/disk05/hotspot/ws/1.4/sa_baseline`

You can build the project by typing `gnumake` in the `src/share/vm/agent` directory.

You can also use the default build target using the Ant build file (build.xml). You can download Ant from http://jakarta.apache.org/ant. Documentation for Ant can be found at http://jakarta.apache.org/ant/manual/index.html

## Running the project

- `java -cp classes sun.jvm.hotspot.HSDB`
- `java -cp classes sun.jvm.hotspot.bugspot.Main`

## Feedback

Refactoring of package hierarchy. All user interface components should be in the ui package. Perhaps: sun.jvm.hotspot.ui.hsdb.Main for the HSDB and sun.jvm.hotspot.ui.bugspot.Main for BugSpot.

The src\share\vm\agent area seems like a workspace so it should be organized like one. In particular, I'd like to suggest the following directory layout:

- src: All sources that are curently under the sun directory.
- classes: compiled class files.
- lib: Resources like images, icons and jar files.
- docs: Documentation
- deploy: distribution bundles for Java Web Start.

Seems like there is a lot of redundant functionality. Between the HSDB and BugSpot. Perhaps this can be consolidated with a `javax.swing.Actions` architecture.

## Tasklist

Stack memory pane: It's one of the more useful JVM debugging tools in the SA. However, it doesn't support any interaction with the text; the Memory Panel in BugSpot was written afterward (with help from Shannon) and implements proper selection, scrolling, and drag-and-drop, but no annotations. I'm not sure how to integrate the annotations with the JTable that's being used for the memory view; if you have suggestions here please let me know.

Integrations with the NetBeans architecture (plug in). See the Netbeans Open APIs homepage

HSDB: Object Histogram. Column sizes should be sized according the the contents. i.e, The size and count columns should be narrow enought to handle the largest window. Since there is a lot of data, sorting and searching should be implemented.

## Log

Last modified: Tue Feb 05 19:15:12 Pacific Standard Time 2002

sun.jvm.hotspot.oops.ObjectHistogram should be the underlying data structure for the TableModels. It shouldnt bother with sorting the data - the table model should do that. It should implement these methods:

          public int getSize()
          public ObjectHistogramElement getElementAt(int row);

ObjectHistogramElement should return the String that represents the third column

Last modified: Tue Feb 05 20:05:13 Pacific Standard Time 2002