src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File open Sdiff src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot

src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java

Print this page




 595 
 596     /**
 597      * Gets the v-table index for interface method {@code method} in the receiver {@code type} or
 598      * {@link HotSpotVMConfig#invalidVtableIndex} if {@code method} is not in {@code type}'s
 599      * v-table.
 600      *
 601      * @throws InternalError if {@code type} is an interface or {@code method} is not held by an
 602      *             interface or class represented by {@code type} is not initialized
 603      */
 604     native int getVtableIndexForInterfaceMethod(HotSpotResolvedObjectTypeImpl type, HotSpotResolvedJavaMethodImpl method);
 605 
 606     /**
 607      * Determines if debug info should also be emitted at non-safepoint locations.
 608      */
 609     native boolean shouldDebugNonSafepoints();
 610 
 611     /**
 612      * Writes {@code length} bytes from {@code bytes} starting at offset {@code offset} to HotSpot's
 613      * log stream.
 614      *





 615      * @throws NullPointerException if {@code bytes == null}
 616      * @throws IndexOutOfBoundsException if copying would cause access of data outside array bounds
 617      */
 618     native void writeDebugOutput(byte[] bytes, int offset, int length);
 619 
 620     /**
 621      * Flush HotSpot's log stream.
 622      */
 623     native void flushDebugOutput();
 624 
 625     /**
 626      * Read a HotSpot Method* value from the memory location described by {@code base} plus
 627      * {@code displacement} and return the {@link HotSpotResolvedJavaMethodImpl} wrapping it. This
 628      * method does no checking that the memory location actually contains a valid pointer and may
 629      * crash the VM if an invalid location is provided. If the {@code base} is null then
 630      * {@code displacement} is used by itself. If {@code base} is a
 631      * {@link HotSpotResolvedJavaMethodImpl}, {@link HotSpotConstantPool} or
 632      * {@link HotSpotResolvedObjectTypeImpl} then the metaspace pointer is fetched from that object
 633      * and added to {@code displacement}. Any other non-null object type causes an
 634      * {@link IllegalArgumentException} to be thrown.
 635      *
 636      * @param base an object to read from or null
 637      * @param displacement
 638      * @return null or the resolved method for this location


 930     /**
 931      * Gets the address of the {@code MethodData::_failed_speculations} field in the
 932      * {@code MethodData} associated with {@code method}. This will create and install the
 933      * {@code MethodData} if it didn't already exist.
 934      */
 935     native long getFailedSpeculationsAddress(HotSpotResolvedJavaMethodImpl method);
 936 
 937     /**
 938      * Frees the failed speculations pointed to by {@code *failedSpeculationsAddress}.
 939      */
 940     native void releaseFailedSpeculations(long failedSpeculationsAddress);
 941 
 942     /**
 943      * Adds a speculation to the failed speculations pointed to by
 944      * {@code *failedSpeculationsAddress}.
 945      *
 946      * @return {@code false} if the speculation could not be appended to the list
 947      */
 948     native boolean addFailedSpeculation(long failedSpeculationsAddress, byte[] speculation);
 949 














 950 }


 595 
 596     /**
 597      * Gets the v-table index for interface method {@code method} in the receiver {@code type} or
 598      * {@link HotSpotVMConfig#invalidVtableIndex} if {@code method} is not in {@code type}'s
 599      * v-table.
 600      *
 601      * @throws InternalError if {@code type} is an interface or {@code method} is not held by an
 602      *             interface or class represented by {@code type} is not initialized
 603      */
 604     native int getVtableIndexForInterfaceMethod(HotSpotResolvedObjectTypeImpl type, HotSpotResolvedJavaMethodImpl method);
 605 
 606     /**
 607      * Determines if debug info should also be emitted at non-safepoint locations.
 608      */
 609     native boolean shouldDebugNonSafepoints();
 610 
 611     /**
 612      * Writes {@code length} bytes from {@code bytes} starting at offset {@code offset} to HotSpot's
 613      * log stream.
 614      *
 615      * @param flush specifies if the log stream should be flushed after writing
 616      * @param canThrow specifies if an error in the {@code bytes}, {@code offset} or {@code length}
 617      *            arguments should result in an exception or a negative return value
 618      * @return 0 on success, -1 if {@code bytes == null && !canThrow}, -2 if {@code !canThrow} and
 619      *         copying would cause access of data outside array bounds
 620      * @throws NullPointerException if {@code bytes == null}
 621      * @throws IndexOutOfBoundsException if copying would cause access of data outside array bounds
 622      */
 623     native int writeDebugOutput(byte[] bytes, int offset, int length, boolean flush, boolean canThrow);
 624 
 625     /**
 626      * Flush HotSpot's log stream.
 627      */
 628     native void flushDebugOutput();
 629 
 630     /**
 631      * Read a HotSpot Method* value from the memory location described by {@code base} plus
 632      * {@code displacement} and return the {@link HotSpotResolvedJavaMethodImpl} wrapping it. This
 633      * method does no checking that the memory location actually contains a valid pointer and may
 634      * crash the VM if an invalid location is provided. If the {@code base} is null then
 635      * {@code displacement} is used by itself. If {@code base} is a
 636      * {@link HotSpotResolvedJavaMethodImpl}, {@link HotSpotConstantPool} or
 637      * {@link HotSpotResolvedObjectTypeImpl} then the metaspace pointer is fetched from that object
 638      * and added to {@code displacement}. Any other non-null object type causes an
 639      * {@link IllegalArgumentException} to be thrown.
 640      *
 641      * @param base an object to read from or null
 642      * @param displacement
 643      * @return null or the resolved method for this location


 935     /**
 936      * Gets the address of the {@code MethodData::_failed_speculations} field in the
 937      * {@code MethodData} associated with {@code method}. This will create and install the
 938      * {@code MethodData} if it didn't already exist.
 939      */
 940     native long getFailedSpeculationsAddress(HotSpotResolvedJavaMethodImpl method);
 941 
 942     /**
 943      * Frees the failed speculations pointed to by {@code *failedSpeculationsAddress}.
 944      */
 945     native void releaseFailedSpeculations(long failedSpeculationsAddress);
 946 
 947     /**
 948      * Adds a speculation to the failed speculations pointed to by
 949      * {@code *failedSpeculationsAddress}.
 950      *
 951      * @return {@code false} if the speculation could not be appended to the list
 952      */
 953     native boolean addFailedSpeculation(long failedSpeculationsAddress, byte[] speculation);
 954 
 955     /**
 956      * @see HotSpotJVMCIRuntime#isCurrentThreadAttached()
 957      */
 958     native boolean isCurrentThreadAttached();
 959 
 960     /**
 961      * @see HotSpotJVMCIRuntime#attachCurrentThread
 962      */
 963     native boolean attachCurrentThread(boolean asDaemon);
 964 
 965     /**
 966      * @see HotSpotJVMCIRuntime#detachCurrentThread()
 967      */
 968     native void detachCurrentThread();
 969 }
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File