This commit is contained in:
Alejandro Murillo 2016-07-07 18:34:58 +00:00
commit 4e5f3447a2
5 changed files with 52750 additions and 27418 deletions

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@
<name>OpenJDK (Native)</name>
<c-extensions>c,m</c-extensions>
<cpp-extensions>cc,cpp</cpp-extensions>
<header-extensions>ad,h,hpp,in_out</header-extensions>
<header-extensions>ad,h,hh,hpp,in_out,map,txt</header-extensions>
<sourceEncoding>UTF-8</sourceEncoding>
<make-dep-projects/>
<sourceRootList>
@ -26,6 +26,9 @@
<type>0</type>
</confElem>
</confList>
<formatting>
<project-formatting-style>false</project-formatting-style>
</formatting>
</data>
</configuration>
</project>

View File

@ -1223,8 +1223,7 @@ JSHELLAPI_DOCTITLE := JShell API
JSHELLAPI_WINDOWTITLE := JShell API
JSHELLAPI_HEADER := <strong>JSHELL API</strong>
JSHELLAPI_BOTTOM := $(call CommonBottom,$(JSHELLAPI_FIRST_COPYRIGHT_YEAR))
JSHELLAPI_GROUPNAME := Packages
JSHELLAPI_REGEXP := jdk.jshell.*
JSHELLAPI_OVERVIEW := $(LANGTOOLS_TOPDIR)/src/jdk.jshell/share/classes/jdk/jshell/overview.html
# JSHELLAPI_PKGS is located in NON_CORE_PKGS.gmk
JSHELLAPI_INDEX_HTML = $(JSHELLAPI_DOCDIR)/index.html
@ -1256,11 +1255,11 @@ $(JSHELLAPI_OPTIONS_FILE):
$(call OptionPair,-modulesourcepath,$(RELEASEDOCS_MODULESOURCEPATH)) ; \
$(call OptionPair,-addmods,$(JSHELLAPI_MODULES)) ; \
$(call OptionPair,-encoding,ascii) ; \
$(call OptionPair,-overview,$(JSHELLAPI_OVERVIEW)) ; \
$(call OptionPair,-doctitle,$(JSHELLAPI_DOCTITLE)) ; \
$(call OptionPair,-windowtitle,$(JSHELLAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
$(call OptionPair,-header,$(JSHELLAPI_HEADER)$(DRAFT_HEADER)) ; \
$(call OptionPair,-bottom,$(JSHELLAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
$(call OptionTrip,-group,$(JSHELLAPI_GROUPNAME),$(JSHELLAPI_REGEXP)); \
$(call OptionTrip,-linkoffline,$(JSHELLAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
) >> $@

View File

@ -81,7 +81,9 @@ ATTACH_PKGS = com.sun.tools.attach \
JCONSOLE_PKGS = com.sun.tools.jconsole
JSHELLAPI_PKGS = jdk.jshell
JSHELLAPI_PKGS = jdk.jshell \
jdk.jshell.spi \
jdk.jshell.execution
TREEAPI_PKGS = com.sun.source.doctree \
com.sun.source.tree \

View File

@ -34,6 +34,7 @@ import java.util.Map;
import java.util.concurrent.Callable;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import sun.hotspot.gc.GC;
/**
* The Class to be invoked by jtreg prior Test Suite execution to
@ -56,11 +57,12 @@ public class VMProps implements Callable<Map<String, String>> {
map.put("vm.bits", vmBits());
map.put("vm.flightRecorder", vmFlightRecorder());
map.put("vm.simpleArch", vmArch());
vmGC(map); // vm.gc.X = true/false
dump(map);
return map;
}
/**
* @return vm.simpleArch value of "os.simpleArch" property of tested JDK.
*/
@ -146,6 +148,24 @@ public class VMProps implements Callable<Map<String, String>> {
return "false";
}
/**
* For all existing GC sets vm.gc.X property.
* Example vm.gc.G1=true means:
* VM supports G1
* User either set G1 explicitely (-XX:+UseG1GC) or did not set any GC
* @param map - property-value pairs
*/
protected void vmGC(Map<String, String> map){
GC currentGC = GC.current();
boolean isByErgo = GC.currentSetByErgo();
List<GC> supportedGC = GC.allSupported();
for (GC gc: GC.values()) {
boolean isSupported = supportedGC.contains(gc);
boolean isAcceptable = isSupported && (gc == currentGC || isByErgo);
map.put("vm.gc." + gc.name(), "" + isAcceptable);
}
}
/**
* Dumps the map to the file if the file name is given as the property.
* This functionality could be helpful to know context in the real