< prev index next >

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

Print this page

 637         boolean withTypeInfo;
 638         if ((codeInstallFlags & 0x0004) != 0 && HotSpotJVMCIRuntime.Option.CodeSerializationTypeInfo.isDefault) {
 639             withTypeInfo = true;
 640         } else {
 641             withTypeInfo = HotSpotJVMCIRuntime.Option.CodeSerializationTypeInfo.getBoolean();
 642         }
 643         try (HotSpotCompiledCodeStream stream = new HotSpotCompiledCodeStream(compiledCode, withTypeInfo, withComments, withMethods)) {
 644             return installCode0(stream.headChunk, stream.timeNS, withTypeInfo, compiledCode, stream.objectPool, code, failedSpeculationsAddress, speculations);
 645         }
 646     }
 647 
 648     native int installCode0(long compiledCodeBuffer,
 649                     long serializationNS,
 650                     boolean withTypeInfo,
 651                     HotSpotCompiledCode compiledCode,
 652                     Object[] objectPool,
 653                     InstalledCode code,
 654                     long failedSpeculationsAddress,
 655                     byte[] speculations);
 656 


 657     /**
 658      * Gets flags specifying optional parts of code info. Only if a flag is set, will the
 659      * corresponding code info being included in the {@linkplain HotSpotCompiledCodeStream
 660      * serialized code stream}.
 661      *
 662      * <ul>
 663      * <li>0x0001: code comments ({@link HotSpotCompiledCode#comments})</li>
 664      * <li>0x0002: methods ({@link HotSpotCompiledCode#methods})</li>
 665      * <li>0x0004: enable {@link Option#CodeSerializationTypeInfo} if it not explicitly specified
 666      * (i.e., {@link Option#isDefault} is {@code true})</li>
 667      * </ul>
 668      */
 669     private native int getInstallCodeFlags();
 670 
 671     /**
 672      * Resets all compilation statistics.
 673      */
 674     native void resetCompilationStatistics();
 675 
 676     /**

 825     }
 826 
 827     private native void setNotInlinableOrCompilable(HotSpotResolvedJavaMethodImpl method, long methodPointer);
 828 
 829     /**
 830      * Invalidates the profiling information for {@code method} and (re)initializes it such that
 831      * profiling restarts upon its next invocation.
 832      */
 833     void reprofile(HotSpotResolvedJavaMethodImpl method) {
 834         reprofile(method, method.getMethodPointer());
 835     }
 836 
 837     private native void reprofile(HotSpotResolvedJavaMethodImpl method, long methodPointer);
 838 
 839     /**
 840      * Updates {@code nmethodMirror} such that {@link InvalidInstalledCodeException} will be raised
 841      * the next time {@code nmethodMirror} is {@linkplain #executeHotSpotNmethod executed}. The
 842      * {@code nmethod} associated with {@code nmethodMirror} is also made non-entrant and if
 843      * {@code deoptimize == true} any current activations of the {@code nmethod} are deoptimized.
 844      */
 845     native void invalidateHotSpotNmethod(HotSpotNmethod nmethodMirror, boolean deoptimize);
 846 
 847     /**
 848      * Collects the current values of all JVMCI benchmark counters, summed up over all threads.
 849      */
 850     native long[] collectCounters();
 851 
 852     /**
 853      * Get the current number of counters allocated for use by JVMCI. Should be the same value as
 854      * the flag {@code JVMCICounterSize}.
 855      */
 856     native int getCountersSize();
 857 
 858     /**
 859      * Attempt to change the size of the counters allocated for JVMCI. This requires a safepoint to
 860      * safely reallocate the storage but it's advisable to increase the size in reasonable chunks.
 861      */
 862     native boolean setCountersSize(int newSize);
 863 
 864     /**
 865      * Determines if {@code methodData} is mature.

 637         boolean withTypeInfo;
 638         if ((codeInstallFlags & 0x0004) != 0 && HotSpotJVMCIRuntime.Option.CodeSerializationTypeInfo.isDefault) {
 639             withTypeInfo = true;
 640         } else {
 641             withTypeInfo = HotSpotJVMCIRuntime.Option.CodeSerializationTypeInfo.getBoolean();
 642         }
 643         try (HotSpotCompiledCodeStream stream = new HotSpotCompiledCodeStream(compiledCode, withTypeInfo, withComments, withMethods)) {
 644             return installCode0(stream.headChunk, stream.timeNS, withTypeInfo, compiledCode, stream.objectPool, code, failedSpeculationsAddress, speculations);
 645         }
 646     }
 647 
 648     native int installCode0(long compiledCodeBuffer,
 649                     long serializationNS,
 650                     boolean withTypeInfo,
 651                     HotSpotCompiledCode compiledCode,
 652                     Object[] objectPool,
 653                     InstalledCode code,
 654                     long failedSpeculationsAddress,
 655                     byte[] speculations);
 656 
 657     native String getInvalidationReasonDescription(int invalidationReason);
 658 
 659     /**
 660      * Gets flags specifying optional parts of code info. Only if a flag is set, will the
 661      * corresponding code info being included in the {@linkplain HotSpotCompiledCodeStream
 662      * serialized code stream}.
 663      *
 664      * <ul>
 665      * <li>0x0001: code comments ({@link HotSpotCompiledCode#comments})</li>
 666      * <li>0x0002: methods ({@link HotSpotCompiledCode#methods})</li>
 667      * <li>0x0004: enable {@link Option#CodeSerializationTypeInfo} if it not explicitly specified
 668      * (i.e., {@link Option#isDefault} is {@code true})</li>
 669      * </ul>
 670      */
 671     private native int getInstallCodeFlags();
 672 
 673     /**
 674      * Resets all compilation statistics.
 675      */
 676     native void resetCompilationStatistics();
 677 
 678     /**

 827     }
 828 
 829     private native void setNotInlinableOrCompilable(HotSpotResolvedJavaMethodImpl method, long methodPointer);
 830 
 831     /**
 832      * Invalidates the profiling information for {@code method} and (re)initializes it such that
 833      * profiling restarts upon its next invocation.
 834      */
 835     void reprofile(HotSpotResolvedJavaMethodImpl method) {
 836         reprofile(method, method.getMethodPointer());
 837     }
 838 
 839     private native void reprofile(HotSpotResolvedJavaMethodImpl method, long methodPointer);
 840 
 841     /**
 842      * Updates {@code nmethodMirror} such that {@link InvalidInstalledCodeException} will be raised
 843      * the next time {@code nmethodMirror} is {@linkplain #executeHotSpotNmethod executed}. The
 844      * {@code nmethod} associated with {@code nmethodMirror} is also made non-entrant and if
 845      * {@code deoptimize == true} any current activations of the {@code nmethod} are deoptimized.
 846      */
 847     native void invalidateHotSpotNmethod(HotSpotNmethod nmethodMirror, boolean deoptimize, int invalidationReason);
 848 
 849     /**
 850      * Collects the current values of all JVMCI benchmark counters, summed up over all threads.
 851      */
 852     native long[] collectCounters();
 853 
 854     /**
 855      * Get the current number of counters allocated for use by JVMCI. Should be the same value as
 856      * the flag {@code JVMCICounterSize}.
 857      */
 858     native int getCountersSize();
 859 
 860     /**
 861      * Attempt to change the size of the counters allocated for JVMCI. This requires a safepoint to
 862      * safely reallocate the storage but it's advisable to increase the size in reasonable chunks.
 863      */
 864     native boolean setCountersSize(int newSize);
 865 
 866     /**
 867      * Determines if {@code methodData} is mature.
< prev index next >