Mercurial > hg > graal-jvmci-8
changeset 22781:5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Wed, 20 Jan 2016 11:13:45 +0100 |
parents | b4ff1a18d19c |
children | bf8a5a6861b1 |
files | jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java |
diffstat | 2 files changed, 31 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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;