# HG changeset patch # User Roland Schatz # Date 1453284825 -3600 # Node ID 5d06abd6d35b9385aaff9af90a6d0cd729c81246 # Parent b4ff1a18d19ca8cd90e08195d903c07ba4db3941 Backport isImmutablePIC field from jvmci-9, and add documentation. diff -r b4ff1a18d19c -r 5d06abd6d35b jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java --- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java Tue Jan 19 17:36:21 2016 -0800 +++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java Wed Jan 20 11:13:45 2016 +0100 @@ -68,13 +68,39 @@ */ protected final ResolvedJavaMethod[] methods; + /** + * A list of comments that will be included in code dumps. + */ protected final Comment[] comments; + /** + * The data section containing constants for the emitted machine code. + */ protected final byte[] dataSection; + + /** + * The minimum alignment of the data section. + */ protected final int dataSectionAlignment; + + /** + * A list of relocations in the {@link #dataSection}. + */ protected final DataPatch[] dataSectionPatches; + /** + * A flag determining whether this code is immutable and position independent. + */ + protected final boolean isImmutablePIC; + + /** + * The total size of the stack frame of this compiled method. + */ protected final int totalFrameSize; + + /** + * Offset in bytes for the custom stack area (relative to sp). + */ protected final int customStackAreaOffset; public static class Comment { @@ -89,7 +115,7 @@ } public HotSpotCompiledCode(String name, byte[] targetCode, int targetCodeSize, Site[] sites, Assumption[] assumptions, ResolvedJavaMethod[] methods, Comment[] comments, byte[] dataSection, - int dataSectionAlignment, DataPatch[] dataSectionPatches, int totalFrameSize, int customStackAreaOffset) { + int dataSectionAlignment, DataPatch[] dataSectionPatches, boolean isImmutablePIC, int totalFrameSize, int customStackAreaOffset) { this.name = name; this.targetCode = targetCode; this.targetCodeSize = targetCodeSize; @@ -101,6 +127,7 @@ this.dataSection = dataSection; this.dataSectionAlignment = dataSectionAlignment; this.dataSectionPatches = dataSectionPatches; + this.isImmutablePIC = isImmutablePIC; this.totalFrameSize = totalFrameSize; this.customStackAreaOffset = customStackAreaOffset; diff -r b4ff1a18d19c -r 5d06abd6d35b jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java --- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java Tue Jan 19 17:36:21 2016 -0800 +++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java Wed Jan 20 11:13:45 2016 +0100 @@ -55,9 +55,9 @@ @SuppressFBWarnings(value = "UWF_UNWRITTEN_FIELD", justification = "set by the VM") private String installationFailureMessage; public HotSpotCompiledNmethod(String name, byte[] targetCode, int targetCodeSize, Site[] sites, Assumption[] assumptions, ResolvedJavaMethod[] methods, Comment[] comments, byte[] dataSection, - int dataSectionAlignment, DataPatch[] dataSectionPatches, int totalFrameSize, int customStackAreaOffset, HotSpotResolvedJavaMethod method, int entryBCI, int id, long jvmciEnv, - boolean hasUnsafeAccess) { - super(name, targetCode, targetCodeSize, sites, assumptions, methods, comments, dataSection, dataSectionAlignment, dataSectionPatches, totalFrameSize, customStackAreaOffset); + int dataSectionAlignment, DataPatch[] dataSectionPatches, boolean isImmutablePIC, int totalFrameSize, int customStackAreaOffset, HotSpotResolvedJavaMethod method, int entryBCI, + int id, long jvmciEnv, boolean hasUnsafeAccess) { + super(name, targetCode, targetCodeSize, sites, assumptions, methods, comments, dataSection, dataSectionAlignment, dataSectionPatches, isImmutablePIC, totalFrameSize, customStackAreaOffset); this.method = method; this.entryBCI = entryBCI; this.id = id;