Mercurial > hg > graal-jvmci-8
comparison jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java @ 23679:b5557b757040
fix HotSpotVMConfig startup performance (JDK-8159167)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 15 Jun 2016 00:00:41 +0200 |
parents | 1d4ce2d19e52 |
children | 8b40dfc73eea |
comparison
equal
deleted
inserted
replaced
23678:e86a0b0ba969 | 23679:b5557b757040 |
---|---|
33 import jdk.vm.ci.code.InstalledCode; | 33 import jdk.vm.ci.code.InstalledCode; |
34 import jdk.vm.ci.code.InvalidInstalledCodeException; | 34 import jdk.vm.ci.code.InvalidInstalledCodeException; |
35 import jdk.vm.ci.code.TargetDescription; | 35 import jdk.vm.ci.code.TargetDescription; |
36 import jdk.vm.ci.common.InitTimer; | 36 import jdk.vm.ci.common.InitTimer; |
37 import jdk.vm.ci.common.JVMCIError; | 37 import jdk.vm.ci.common.JVMCIError; |
38 import jdk.vm.ci.hotspotvmconfig.HotSpotVMField; | |
39 import jdk.vm.ci.meta.JavaType; | 38 import jdk.vm.ci.meta.JavaType; |
40 import jdk.vm.ci.meta.ResolvedJavaMethod; | 39 import jdk.vm.ci.meta.ResolvedJavaMethod; |
41 import jdk.vm.ci.meta.ResolvedJavaType; | 40 import jdk.vm.ci.meta.ResolvedJavaType; |
42 import sun.misc.Unsafe; | 41 import sun.misc.Unsafe; |
43 | 42 |
319 * Resets all compilation statistics. | 318 * Resets all compilation statistics. |
320 */ | 319 */ |
321 native void resetCompilationStatistics(); | 320 native void resetCompilationStatistics(); |
322 | 321 |
323 /** | 322 /** |
324 * Initializes the fields of {@code config}. | 323 * Reads the database of VM info. The return value encodes the info in a nested object array |
325 */ | 324 * that is described by the pseudo Java object {@code info} below: |
326 native void initializeConfiguration(HotSpotVMConfig config); | 325 * |
326 * <pre> | |
327 * info = [ | |
328 * VMField[] vmFields, | |
329 * [String name, Long size, ...] vmTypeSizes, | |
330 * [String name, Long value, ...] vmConstants, | |
331 * [String name, Long value, ...] vmAddresses, | |
332 * VMFlag[] vmFlags | |
333 * ] | |
334 * </pre> | |
335 * | |
336 * @return VM info as encoded above | |
337 */ | |
338 native Object[] readConfiguration(); | |
327 | 339 |
328 /** | 340 /** |
329 * Resolves the implementation of {@code method} for virtual dispatches on objects of dynamic | 341 * Resolves the implementation of {@code method} for virtual dispatches on objects of dynamic |
330 * type {@code exactReceiver}. This resolution process only searches "up" the class hierarchy of | 342 * type {@code exactReceiver}. This resolution process only searches "up" the class hierarchy of |
331 * {@code exactReceiver}. | 343 * {@code exactReceiver}. |
419 * @return 0 if {@code method} does not have a local variable table | 431 * @return 0 if {@code method} does not have a local variable table |
420 */ | 432 */ |
421 native long getLocalVariableTableStart(HotSpotResolvedJavaMethodImpl method); | 433 native long getLocalVariableTableStart(HotSpotResolvedJavaMethodImpl method); |
422 | 434 |
423 /** | 435 /** |
424 * Reads an object pointer within a VM data structure. That is, any {@link HotSpotVMField} whose | 436 * Reads an object pointer within a VM data structure. That is, any {@link VMField} whose |
425 * {@link HotSpotVMField#type() type} is {@code "oop"} (e.g., | 437 * {@link VMField#type type} is {@code "oop"} (e.g., {@code ArrayKlass::_component_mirror}, |
426 * {@code ArrayKlass::_component_mirror}, {@code Klass::_java_mirror}, | 438 * {@code Klass::_java_mirror}, {@code JavaThread::_threadObj}). |
427 * {@code JavaThread::_threadObj}). | |
428 * | 439 * |
429 * Note that {@link Unsafe#getObject(Object, long)} cannot be used for this since it does a | 440 * Note that {@link Unsafe#getObject(Object, long)} cannot be used for this since it does a |
430 * {@code narrowOop} read if the VM is using compressed oops whereas oops within VM data | 441 * {@code narrowOop} read if the VM is using compressed oops whereas oops within VM data |
431 * structures are (currently) always uncompressed. | 442 * structures are (currently) always uncompressed. |
432 * | 443 * |