< prev index next >
src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/Phase.java
Print this page
rev 8632 : 6900757: minor bug fixes to LogCompilation tool
* improve internal error reporting (point to XML element causing trouble)
* fix comparator for sorting by name and start
* make tool more robust wrt. incorrect options and files not found
* make inlining decision output more clear
* adopt uncommon traps history printing
* properly mention compiler in generated logs
* add options for printing time stamps and omitting compilation IDs
* add option for comparing compilation logs
* overall code cleanup and API documentation
*** 1,7 ****
/*
! * Copyright (c) 2009, 2011, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2009, 2015, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 24,38 ****
--- 24,57 ----
package com.sun.hotspot.tools.compiler;
import java.io.PrintStream;
+ /**
+ * Representation of a compilation phase as a log event.
+ */
public class Phase extends BasicLogEvent {
+ /**
+ * The number of nodes in the compilation at the beginning of this phase.
+ */
private final int startNodes;
+
+ /**
+ * The number of nodes in the compilation at the end of this phase.
+ */
private int endNodes;
+
+ /**
+ * The number of live nodes in the compilation at the beginning of this
+ * phase.
+ */
private final int startLiveNodes;
+
+ /**
+ * The number of live nodes in the compilation at the end of this phase.
+ */
private int endLiveNodes;
Phase(String n, double s, int nodes, int live) {
super(s, n);
startNodes = nodes;
*** 56,67 ****
}
public int getEndNodes() {
return endNodes;
}
! /* Number of live nodes added by the phase */
! int getLiveNodes() {
return getEndLiveNodes() - getStartLiveNodes();
}
void setEndLiveNodes(int n) {
endLiveNodes = n;
--- 75,89 ----
}
public int getEndNodes() {
return endNodes;
}
!
! /**
! * The number of live nodes added by this phase.
! */
! int getAddedLiveNodes() {
return getEndLiveNodes() - getStartLiveNodes();
}
void setEndLiveNodes(int n) {
endLiveNodes = n;
*** 74,82 ****
public int getEndLiveNodes() {
return endLiveNodes;
}
@Override
! public void print(PrintStream stream) {
throw new UnsupportedOperationException("Not supported yet.");
}
}
--- 96,104 ----
public int getEndLiveNodes() {
return endLiveNodes;
}
@Override
! public void print(PrintStream stream, boolean printID) {
throw new UnsupportedOperationException("Not supported yet.");
}
}
< prev index next >