< prev index next >

test/gc/g1/ihop/lib/IhopUtils.java

Print this page




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 package gc.g1.ihop.lib;
  24 
  25 import java.util.List;
  26 import java.util.regex.Matcher;
  27 import java.util.regex.Pattern;
  28 import java.util.stream.Collectors;
  29 import java.util.stream.Stream;
  30 import jdk.test.lib.OutputAnalyzer;
  31 
  32 
  33 /**
  34  * Utility class to extract IHOP related information from the GC log.
  35  * The class provides a number of static method to be used from tests.
  36  */
  37 public class IhopUtils {
  38 
  39     // Examples of GC log for IHOP:
  40     // [0.402s][debug][gc,ergo,ihop] GC(9) Do not request concurrent cycle initiation (still doing mixed collections) occupancy: 66060288B allocation request: 0B threshold: 59230757B (88.26) source: end of GC
  41     // [0.466s][debug][gc,ergo,ihop] GC(18) Request concurrent cycle initiation (occupancy higher than threshold) occupancy: 52428800B allocation request: 0B threshold: 0B (0.00) source: end of GC
  42 
  43     /**
  44      * Patterns are used for extracting occupancy and threshold from GC log.
  45      */
  46     private final static Pattern OCCUPANCY = Pattern.compile("occupancy: (\\d+)B");
  47     private final static Pattern THRESHOLD = Pattern.compile("threshold: (\\d+)B");
  48 
  49     /**
  50      * Messages related to concurrent cycle initiation.




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 package gc.g1.ihop.lib;
  24 
  25 import java.util.List;
  26 import java.util.regex.Matcher;
  27 import java.util.regex.Pattern;
  28 import java.util.stream.Collectors;
  29 import java.util.stream.Stream;
  30 import jdk.test.lib.process.OutputAnalyzer;
  31 
  32 
  33 /**
  34  * Utility class to extract IHOP related information from the GC log.
  35  * The class provides a number of static method to be used from tests.
  36  */
  37 public class IhopUtils {
  38 
  39     // Examples of GC log for IHOP:
  40     // [0.402s][debug][gc,ergo,ihop] GC(9) Do not request concurrent cycle initiation (still doing mixed collections) occupancy: 66060288B allocation request: 0B threshold: 59230757B (88.26) source: end of GC
  41     // [0.466s][debug][gc,ergo,ihop] GC(18) Request concurrent cycle initiation (occupancy higher than threshold) occupancy: 52428800B allocation request: 0B threshold: 0B (0.00) source: end of GC
  42 
  43     /**
  44      * Patterns are used for extracting occupancy and threshold from GC log.
  45      */
  46     private final static Pattern OCCUPANCY = Pattern.compile("occupancy: (\\d+)B");
  47     private final static Pattern THRESHOLD = Pattern.compile("threshold: (\\d+)B");
  48 
  49     /**
  50      * Messages related to concurrent cycle initiation.


< prev index next >