34 * Gets 0 or more prefixes identifying classes that should by compiled by C1 in simple mode
35 * (i.e., {@code CompLevel_simple}) when HotSpot is running with tiered compilation. The
36 * prefixes should be class or package names using "/" as the separator, e.g. "jdk/vm/ci".
37 *
38 * @return 0 or more Strings identifying packages that should by compiled by the first tier only
39 * or null if no redirection to C1 should be performed.
40 */
41 public String[] getTrivialPrefixes() {
42 return null;
43 }
44
45 /**
46 * Determines if this object may want to adjust the compilation level for a method that is being
47 * scheduled by the VM for compilation. The legal return values and their meanings are:
48 * <ul>
49 * <li>0 - no adjustment</li>
50 * <li>1 - adjust based on declaring class of method</li>
51 * <li>2 - adjust based on declaring class, name and signature of method</li>
52 * </ul>
53 */
54 public int getCompilationLevelAdjustment(HotSpotVMConfig config) {
55 return config.compLevelAdjustmentNone;
56 }
57
58 /**
59 * Potentially modifies the compilation level currently selected by the VM compilation policy
60 * for a method.
61 *
62 * @param config object for reading HotSpot {@code CompLevel} enum values
63 * @param declaringClass the class in which the method is declared
64 * @param name the name of the method or {@code null} depending on the value that was returned
65 * by {@link #getCompilationLevelAdjustment(HotSpotVMConfig)}
66 * @param signature the signature of the method or {@code null} depending on the value that was
67 * returned by {@link #getCompilationLevelAdjustment(HotSpotVMConfig)}
68 * @param isOsr specifies if the compilation being scheduled in an OSR compilation
69 * @param level the compilation level currently selected by the VM compilation policy
70 * @return the compilation level to use for the compilation being scheduled (must be a valid
71 * {@code CompLevel} enum value)
72 */
73 public int adjustCompilationLevel(HotSpotVMConfig config, Class<?> declaringClass, String name, String signature, boolean isOsr, int level) {
74 throw new InternalError("Should not reach here");
75 }
76 }
|
34 * Gets 0 or more prefixes identifying classes that should by compiled by C1 in simple mode
35 * (i.e., {@code CompLevel_simple}) when HotSpot is running with tiered compilation. The
36 * prefixes should be class or package names using "/" as the separator, e.g. "jdk/vm/ci".
37 *
38 * @return 0 or more Strings identifying packages that should by compiled by the first tier only
39 * or null if no redirection to C1 should be performed.
40 */
41 public String[] getTrivialPrefixes() {
42 return null;
43 }
44
45 /**
46 * Determines if this object may want to adjust the compilation level for a method that is being
47 * scheduled by the VM for compilation. The legal return values and their meanings are:
48 * <ul>
49 * <li>0 - no adjustment</li>
50 * <li>1 - adjust based on declaring class of method</li>
51 * <li>2 - adjust based on declaring class, name and signature of method</li>
52 * </ul>
53 */
54 @SuppressWarnings("unexportedinapi")
55 public int getCompilationLevelAdjustment(HotSpotVMConfig config) {
56 return config.compLevelAdjustmentNone;
57 }
58
59 /**
60 * Potentially modifies the compilation level currently selected by the VM compilation policy
61 * for a method.
62 *
63 * @param config object for reading HotSpot {@code CompLevel} enum values
64 * @param declaringClass the class in which the method is declared
65 * @param name the name of the method or {@code null} depending on the value that was returned
66 * by {@link #getCompilationLevelAdjustment(HotSpotVMConfig)}
67 * @param signature the signature of the method or {@code null} depending on the value that was
68 * returned by {@link #getCompilationLevelAdjustment(HotSpotVMConfig)}
69 * @param isOsr specifies if the compilation being scheduled in an OSR compilation
70 * @param level the compilation level currently selected by the VM compilation policy
71 * @return the compilation level to use for the compilation being scheduled (must be a valid
72 * {@code CompLevel} enum value)
73 */
74 @SuppressWarnings("unexportedinapi")
75 public int adjustCompilationLevel(HotSpotVMConfig config, Class<?> declaringClass, String name, String signature, boolean isOsr, int level) {
76 throw new InternalError("Should not reach here");
77 }
78 }
|