From c4df8e24bcef4bdd87e4b03e63ca9c6e618693fa Mon Sep 17 00:00:00 2001 From: Staffan Larsen Date: Thu, 5 Mar 2015 11:39:15 +0100 Subject: [PATCH 1/2] 8058470: [jconsole] VM Summary Tab is blank for JDK9's jconsole Reviewed-by: erikj --- make/common/JavaCompilation.gmk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/common/JavaCompilation.gmk b/make/common/JavaCompilation.gmk index 41f1f0745da..d2bad5e88de 100644 --- a/make/common/JavaCompilation.gmk +++ b/make/common/JavaCompilation.gmk @@ -393,7 +393,7 @@ define add_file_to_clean $(MKDIR) -p $$(@D) export LC_ALL=C ; ( $(CAT) $$< && $(ECHO) "" ) \ | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \ - -e 's/\([^\\]\)!/\1\\!/g' -e 's/#.*/#/g' \ + -e 's/\([^\\]\)!/\1\\!/g' -e 's/^[ ]*#.*/#/g' \ | $(SED) -f "$(SRC_ROOT)/make/common/support/unicode2x.sed" \ | $(SED) -e '/^#/d' -e '/^$$$$/d' \ -e :a -e '/\\$$$$/N; s/\\\n//; ta' \ From 8a235045ca1416362a49fa18b0d5a1fc35d007ab Mon Sep 17 00:00:00 2001 From: Igor Ignatyev Date: Thu, 12 Mar 2015 19:11:17 +0300 Subject: [PATCH 2/2] 8074980: add WhiteBox API to get a flag value for a method Reviewed-by: kvn, fzhinkin --- test/lib/sun/hotspot/WhiteBox.java | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/test/lib/sun/hotspot/WhiteBox.java b/test/lib/sun/hotspot/WhiteBox.java index b19845392ff..fb95cc4a106 100644 --- a/test/lib/sun/hotspot/WhiteBox.java +++ b/test/lib/sun/hotspot/WhiteBox.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -27,6 +27,7 @@ package sun.hotspot; import java.lang.reflect.Executable; import java.util.Arrays; import java.util.List; +import java.util.function.BiFunction; import java.util.function.Function; import java.util.stream.Stream; import java.security.BasicPermission; @@ -250,6 +251,23 @@ public class WhiteBox { } return offset; } + public native Boolean getMethodBooleanOption(Executable method, String name); + public native Long getMethodIntxOption(Executable method, String name); + public native Long getMethodUintxOption(Executable method, String name); + public native Double getMethodDoubleOption(Executable method, String name); + public native String getMethodStringOption(Executable method, String name); + private final List> methodOptionGetters + = Arrays.asList(this::getMethodBooleanOption, this::getMethodIntxOption, + this::getMethodUintxOption, this::getMethodDoubleOption, + this::getMethodStringOption); + + public Object getMethodOption(Executable method, String name) { + return methodOptionGetters.stream() + .map(f -> f.apply(method, name)) + .filter(x -> x != null) + .findAny() + .orElse(null); + } // Safepoint Checking public native void assertMatchingSafepointCalls(boolean mutexSafepointValue, boolean attemptedNoSafepointValue);