Skip to content

Commit

Permalink
Resolve javadoc issues and move some test cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Millson committed Sep 30, 2016
1 parent 8b3b021 commit 8d501e0
Show file tree
Hide file tree
Showing 64 changed files with 681 additions and 831 deletions.
20 changes: 9 additions & 11 deletions src/main/java/org/eclipselabs/garbagecat/domain/JvmRun.java
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,9 @@ public long getStoppedTimeThroughput() {
}

/**
* Ratio of GC to Stopped Time as a percent rounded to the nearest integer. 100 means all stopped time spent doing
* GC. 0 means none of the stopped time was due to GC.
*
* @return Ratio of GC to Stopped Time as a percent rounded to the nearest integer. 100 means all stopped time spent
* doing GC. 0 means none of the stopped time was due to GC.
*/
public long getGcStoppedRatio() {
long gcStoppedRatio;
Expand All @@ -370,8 +371,6 @@ public long getGcStoppedRatio() {

/**
* Do analysis.
*
* @return A <code>List</code> of analysis points based on the JVM options and data.
*/
public void doAnalysis() {

Expand Down Expand Up @@ -413,12 +412,11 @@ public void doAnalysis() {
}
}

// 7) Check for concurrent mode failure by logging event type. Going forward, this will be identified by a
// trigger, not a new logging event. This is needed to deal with legacy code that unfortunately created many
// unnecessary events instead of preparsing them into their component events.
// 7) Check for concurrent mode failure by logging event type. This is needed to deal with legacy code that does
// not understand triggers and creates many unnecessary events instead of preparsing them into their component
// events and/or triggers.
if (!analysisKeys.contains(Analysis.KEY_CMS_CONCURRENT_MODE_FAILURE)) {
if (getEventTypes().contains(LogEventType.CMS_SERIAL_OLD_CONCURRENT_MODE_FAILURE)
|| getEventTypes().contains(LogEventType.PAR_NEW_PROMOTION_FAILED_CMS_CONCURRENT_MODE_FAILURE)
if (getEventTypes().contains(LogEventType.PAR_NEW_PROMOTION_FAILED_CMS_CONCURRENT_MODE_FAILURE)
|| getEventTypes().contains(LogEventType.PAR_NEW_CONCURRENT_MODE_FAILURE_PERM_DATA)
|| getEventTypes().contains(LogEventType.PAR_NEW_PROMOTION_FAILED_CMS_CONCURRENT_MODE_FAILURE)
|| getEventTypes()
Expand Down Expand Up @@ -634,7 +632,7 @@ private void doJvmOptionsAnalysis() {
/**
* Determine if the JVM run used the G1 collector.
*
* @param eventType
* @param eventTypes
* Log entry <code>LogEventType</code>.
* @return True if any <code>LogEventType</code> is G1, false otherwise.
*/
Expand All @@ -654,7 +652,7 @@ public boolean isG1Collector(List<LogEventType> eventTypes) {
/**
* Determine if the JVM run used the CMS collector.
*
* @param eventType
* @param eventTypes
* Log entry <code>LogEventType</code>.
* @return True if any <code>LogEventType</code> is G1, false otherwise.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class UnknownEvent implements LogEvent {
* Default constructor.
*
* @param logEntry
* The log entry for the event.
*/
public UnknownEvent(String logEntry) {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
* This option is redundant, as the same information can be calculated from the GC logging timestamps and durations.
* Therefore, advise against using it, as it adds overhead with no analysis value.
* </p>
* </p>
*
* <h3>Example Logging</h3>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
*
* <p>
* Other JVM operations that require a safepoint:
* </p>
* <ul>
* <li>ThreadDump</li>
* <li>HeapDumper</li>
Expand All @@ -51,7 +52,6 @@
* <li>FindDeadlock</li>
* <li>EnableBiasLocking</li>
* </ul>
* </p>
*
* <h3>Example Logging</h3>
*
Expand All @@ -75,7 +75,7 @@
*
* <p>
* 2) Stopping threads information added JDK8 update 40:
* <p>
* </p>
*
* <pre>
* 0.147: Total time for which application threads were stopped: 0.0000921 seconds, Stopping threads took: 0.0000190 seconds
Expand Down Expand Up @@ -113,7 +113,10 @@ public class ApplicationStoppedTimeEvent implements LogEvent {
private static Pattern pattern = Pattern.compile(ApplicationStoppedTimeEvent.REGEX);

/**
* Create application stopped time logging event from log entry.
* Create event from log entry.
*
* @param logEntry
* The log entry for the event.
*/
public ApplicationStoppedTimeEvent(String logEntry) {
this.logEntry = logEntry;
Expand All @@ -130,8 +133,11 @@ public ApplicationStoppedTimeEvent(String logEntry) {
* Alternate constructor. Create application stopped time event from values.
*
* @param logEntry
* The log entry for the event.
* @param timestamp
* The time when the GC event happened in milliseconds after JVM startup.
* @param duration
* The elapsed clock time for the GC event in microseconds (rounded).
*/
public ApplicationStoppedTimeEvent(String logEntry, long timestamp, int duration) {
this.logEntry = logEntry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ public class CmsInitialMarkEvent implements BlockingEvent, TriggerData, CmsColle
private static Pattern pattern = Pattern.compile(CmsInitialMarkEvent.REGEX);

/**
* Create CMS Initial Mark logging event from log entry.
* Create event from log entry.
*
* @param logEntry
* The log entry for the event.
*/
public CmsInitialMarkEvent(String logEntry) {
this.logEntry = logEntry;
Expand All @@ -99,8 +102,11 @@ public CmsInitialMarkEvent(String logEntry) {
* Alternate constructor. Create CMS Initial Mark from values.
*
* @param logEntry
* The log entry for the event.
* @param timestamp
* The time when the GC event happened in milliseconds after JVM startup.
* @param duration
* The elapsed clock time for the GC event in milliseconds.
*/
public CmsInitialMarkEvent(String logEntry, long timestamp, int duration) {
this.logEntry = logEntry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ public class CmsRemarkEvent implements BlockingEvent, CmsCollection, TriggerData
private static Pattern pattern = Pattern.compile(CmsRemarkEvent.REGEX);

/**
* Create CMS Remark logging event from log entry.
* Create event from log entry.
*
* @param logEntry
* The log entry for the event.
*/
public CmsRemarkEvent(String logEntry) {
this.logEntry = logEntry;
Expand All @@ -110,8 +111,11 @@ public CmsRemarkEvent(String logEntry) {
* Alternate constructor. Create CMS Remark logging event from values.
*
* @param logEntry
* The log entry for the event.
* @param timestamp
* The time when the GC event happened in milliseconds after JVM startup.
* @param duration
* The elapsed clock time for the GC event in milliseconds.
*/
public CmsRemarkEvent(String logEntry, long timestamp, int duration) {
this.logEntry = logEntry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@
* A {@link org.eclipselabs.garbagecat.domain.jdk.CmsRemarkEvent} with the <code>-XX:+CMSClassUnloadingEnabled</code>
* JVM option enabled to allow perm gen / metaspace collections. The concurrent low pause collector does not allow for
* class unloading by default.
* </p>
*
* <h3>Example Logging</h3>
* </p>
*
* <p>
* 1) JDK 1.6:
* </p>
*
* <pre>
* 76694.727: [GC[YG occupancy: 80143 K (153344 K)]76694.727: [Rescan (parallel) , 0.0574180 secs]76694.785: [weak refs processing, 0.0170540 secs]76694.802: [class unloading, 0.0363010 secs]76694.838: [scrub symbol & string tables, 0.0276600 secs] [1 CMS-remark: 443542K(4023936K)] 523686K(4177280K), 0.1446880 secs]
* 76694.727: [GC[YG occupancy: 80143 K (153344 K)]76694.727: [Rescan (parallel) , 0.0574180 secs]76694.785: [weak refs processing, 0.0170540 secs]76694.802: [class unloading, 0.0363010 secs]76694.838: [scrub symbol &amp; string tables, 0.0276600 secs] [1 CMS-remark: 443542K(4023936K)] 523686K(4177280K), 0.1446880 secs]
* </pre>
*
* <p>
* After the collection there was young occupancy 80143K, old occupancy 443542K, and total occupancy 523686K.
* </p>
*
* <p>
* 2) JDK 1.7 with "scrub symbol table" and "scrub string table" vs. "scrub symbol & string tables":
* 2) JDK 1.7 with "scrub symbol table" and "scrub string table" vs. "scrub symbol &amp; string tables":
* </p>
*
* <pre>
Expand Down Expand Up @@ -111,9 +111,10 @@ public class CmsRemarkWithClassUnloadingEvent implements BlockingEvent, TriggerD
private static Pattern pattern = Pattern.compile(CmsRemarkWithClassUnloadingEvent.REGEX);

/**
* Create CMS Remark with class unloading logging event from log entry.
* Create event from log entry.
*
* @param logEntry
* The log entry for the event.
*/
public CmsRemarkWithClassUnloadingEvent(String logEntry) {
this.logEntry = logEntry;
Expand All @@ -130,8 +131,11 @@ public CmsRemarkWithClassUnloadingEvent(String logEntry) {
* Alternate constructor. Create CMS Remark with class unloading logging event from values.
*
* @param logEntry
* The log entry for the event.
* @param timestamp
* The time when the GC event happened in milliseconds after JVM startup.
* @param duration
* The elapsed clock time for the GC event in milliseconds
*/
public CmsRemarkWithClassUnloadingEvent(String logEntry, long timestamp, int duration) {
this.logEntry = logEntry;
Expand Down
Loading

0 comments on commit 8d501e0

Please sign in to comment.