Skip to content

Commit

Permalink
upstream merge from 'develop' into 'feature/#73/ibmj9'
Browse files Browse the repository at this point in the history
  • Loading branch information
chewiebug committed Feb 25, 2015
2 parents 23d4e05 + 60f537b commit 6e91389
Show file tree
Hide file tree
Showing 43 changed files with 1,168 additions and 1,044 deletions.
12 changes: 8 additions & 4 deletions README
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
GCViewer 1.34.1
===============
GCViewer 1.35
=============

GCViewer is a little tool that visualizes verbose GC output
generated by Sun / Oracle, IBM, HP and BEA Java Virtual Machines. It
is free software released under GNU LGPL.

You can start GCViewer (gui) by simply double-clicking on gcviewer-1.3x.jar
or running java -jar gcviewer-1.3x.jar (it needs a java 1.7 vm to run).
or running java -jar gcviewer-1.3x.jar (it needs a java 1.8 vm to run).

For a cmdline based report summary just type:
java -jar gcviewer-1.3x.jar gc.log summary.csv [chart.png] [-t PLAIN|CSV|CSV_TS|SIMPLE|SUMMARY]
Expand All @@ -26,7 +26,11 @@ Supported verbose:gc formats are:
- HP-UX JDK 1.2/1.3/1.4.x with the option -Xverbosegc
- BEA JRockit 1.4.2/1.5/1.6 with the option -verbose:memory [-Xverbose:gcpause,gcreport] [-Xverbosetimestamp]

Best results are achieved with: -Xloggc:<file> -XX:+PrintGCDetails -XX:+PrintGCDateStamps
Best results are achieved with: -Xloggc:<file> -XX:+PrintGCDetails -XX:+PrintGCDateStamps.
A few other options are supported, but most of the information generated is ignored by GCViewer
(the javadoc introduction of
https://github.com/chewiebug/GCViewer/blob/master/src/main/java/com/tagtraum/perf/gcviewer/imp/DataReaderSun1_6_0.java
shows the details).

Hendrik Schreiber wrote GCViewer up to 1.29. What you are seeing here is based
on his very good work.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</parent>
<groupId>com.github.chewiebug</groupId>
<artifactId>gcviewer</artifactId>
<version>1.34.1-SNAPSHOT</version>
<version>1.35-SNAPSHOT</version>
<packaging>jar</packaging>
<name>GCViewer</name>
<description>GCViewer is a little tool that visualizes verbose GC output generated by Sun / Oracle, IBM, HP and BEA Java Virtual Machines. It is free software released under GNU LGPL.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

/**
* AutoCompletionComboBox.
* <p/>
* Date: Oct 6, 2005
* Time: 1:16:42 PM
*
* @author <a href="mailto:[email protected]">Hendrik Schreiber</a>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@

/**
* AutoCompletionTextField.
* <p/>
* Date: Oct 6, 2005
* Time: 9:49:21 AM
*
* @author <a href="mailto:[email protected]">Hendrik Schreiber</a>
*/
Expand Down
24 changes: 11 additions & 13 deletions src/main/java/com/tagtraum/perf/gcviewer/ChartPanelView.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,13 @@
* for layouting.
*
* @author <a href="mailto:[email protected]">Hendrik Schreiber</a>
* <p>Date: May 5, 2005<br/>
* Time: 2:14:36 PM</p>
*/
public class ChartPanelView {

public static final String EVENT_MINIMIZED = "minimized";

private GCPreferences preferences;

private ModelChartImpl modelChart;
private ModelPanel modelPanel;
private ModelDetailsPanel modelDetailsPanel;
Expand All @@ -57,27 +55,27 @@ public class ChartPanelView {
private GCDocument gcDocument;
private TextAreaLogHandler textAreaLogHandler;
private DataReaderFacade dataReaderFacade;

public ChartPanelView(GCDocument gcDocument, URL url) throws DataReaderException {
this.gcDocument = gcDocument;
this.preferences = gcDocument.getPreferences();
this.modelChart = new ModelChartImpl();
this.modelPanel = new ModelPanel();
this.modelDetailsPanel = new ModelDetailsPanel();
JScrollPane modelDetailsScrollPane = new JScrollPane(modelDetailsPanel,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,

JScrollPane modelDetailsScrollPane = new JScrollPane(modelDetailsPanel,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);

JScrollBar hScrollBar = modelDetailsScrollPane.getHorizontalScrollBar();
hScrollBar.setUnitIncrement(10);
JScrollBar vScrollBar = modelDetailsScrollPane.getVerticalScrollBar();
vScrollBar.setUnitIncrement(10);

this.modelChartAndDetailsPanel = new JTabbedPane();
this.modelChartAndDetailsPanel.addTab(LocalisationHelper.getString("data_panel_tab_chart"), modelChart);
this.modelChartAndDetailsPanel.addTab(LocalisationHelper.getString("data_panel_tab_details"), modelDetailsScrollPane);

this.viewBar = new ViewBar(this);
this.propertyChangeSupport = new SwingPropertyChangeSupport(this);
this.textAreaLogHandler = new TextAreaLogHandler();
Expand All @@ -91,7 +89,7 @@ public ChartPanelView(GCDocument gcDocument, URL url) throws DataReaderException
/**
* Reloads the model displayed in this chart panel if it has changed. Using the parameter
* the parser error dialog can be suppressed.
*
*
* @param showParserErrors if <code>true</code> parser errors will be shown
* @return <code>true</code>, if the file has been reloaded
* @throws DataReaderException if something went wrong reading the file
Expand Down Expand Up @@ -146,7 +144,7 @@ public void setMinimized(boolean minimized) {
public JTabbedPane getModelChartAndDetails() {
return modelChartAndDetailsPanel;
}

public ModelChart getModelChart() {
return modelChart;
}
Expand Down
29 changes: 13 additions & 16 deletions src/main/java/com/tagtraum/perf/gcviewer/DesktopPane.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@

/**
* DesktopPane is the "background" of the application after opening.
* <p/>
* Date: Sep 27, 2005
* Time: 9:41:33 AM
*
* @author <a href="mailto:[email protected]">Hendrik Schreiber</a>
*/
Expand Down Expand Up @@ -78,42 +75,42 @@ public void drop(DropTargetDropEvent e) {
}

private ImageIcon logoIcon = new ImageIcon(GCViewerGui.class.getResource("gcviewer_background.png"));

public void paint(Graphics g) {
fillBackground(g);

// draw logo
g.drawImage(logoIcon.getImage(),
getWidth()/2 - logoIcon.getIconWidth()/2,
getHeight()/2 - logoIcon.getIconHeight()/2,
logoIcon.getIconWidth(),
logoIcon.getIconHeight(),
g.drawImage(logoIcon.getImage(),
getWidth()/2 - logoIcon.getIconWidth()/2,
getHeight()/2 - logoIcon.getIconHeight()/2,
logoIcon.getIconWidth(),
logoIcon.getIconHeight(),
logoIcon.getImageObserver());

drawVersionString(g, logoIcon);

super.paint(g);
}

/**
* Adds version string below <code>logoImage</code>.
*
*
* @param g
*/
private void drawVersionString(Graphics g, ImageIcon logoImage) {
g.setColor(Color.LIGHT_GRAY);
g.setFont(new Font("Serif", Font.BOLD, 12));

// use anti aliasing to draw string
Graphics2D g2d = (Graphics2D)g;
Object oldAAHint = g2d.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

String versionString = "version: " + BuildInfoReader.getVersion() + " (" + BuildInfoReader.getBuildDate() + ")";
g.drawString(versionString,
g.drawString(versionString,
getWidth()/2 - g.getFontMetrics().stringWidth(versionString)/2,
getHeight()/2 + logoImage.getIconHeight()/2 + 25);

g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, oldAAHint);
}

Expand Down
16 changes: 8 additions & 8 deletions src/main/java/com/tagtraum/perf/gcviewer/GCDocument.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
import com.tagtraum.perf.gcviewer.imp.DataReaderException;

/**
* GCDocument.
*
* @author <a href="mailto:[email protected]">Hendrik Schreiber</a>
* Date: May 5, 2005
* Time: 10:25:16 AM
*/
public class GCDocument extends JInternalFrame {

Expand Down Expand Up @@ -121,7 +121,10 @@ public void setShowModelPanel(boolean showModelPanel) {
}

/**
* Reload Models.
*
* @return true, if any of the files has been reloaded
* @param background true if relayout should be skipped.
* @throws DataReaderException if something went wrong reading the data
*/
public boolean reloadModels(boolean background) throws DataReaderException {
Expand All @@ -142,7 +145,7 @@ public ModelChart getModelChart() {
public GCPreferences getPreferences() {
return preferences;
}

public void add(final URL url) throws DataReaderException {
ChartPanelView chartPanelView = new ChartPanelView(this, url);
chartPanelViews.add(chartPanelView);
Expand Down Expand Up @@ -612,19 +615,16 @@ public void stateChanged(ChangeEvent e) {
}

}

/**
*
*
* @author <a href="mailto:[email protected]">Joerg Wuethrich</a>
* <p>created on: 22.07.2012</p>
*/
private class ResizeListener extends ComponentAdapter {

@Override
public void componentResized(ComponentEvent e) {
modelChartListFacade.resetPolygonCache();
}

}
}
Loading

0 comments on commit 6e91389

Please sign in to comment.