< prev index next >

src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java

Print this page
rev 12637 : 8174957: [JVMCI] jaotc is broken in Xcomp mode


 480     void notifyInstall(HotSpotCodeCacheProvider hotSpotCodeCacheProvider, InstalledCode installedCode, CompiledCode compiledCode) {
 481         for (HotSpotVMEventListener vmEventListener : getVmEventListeners()) {
 482             vmEventListener.notifyInstall(hotSpotCodeCacheProvider, installedCode, compiledCode);
 483         }
 484     }
 485 
 486     @SuppressFBWarnings(value = "DM_DEFAULT_ENCODING", justification = "no localization here please!")
 487     private static void printConfigLine(CompilerToVM vm, String format, Object... args) {
 488         String line = String.format(format, args);
 489         byte[] lineBytes = line.getBytes();
 490         vm.writeDebugOutput(lineBytes, 0, lineBytes.length);
 491         vm.flushDebugOutput();
 492     }
 493 
 494     private static void printConfig(HotSpotVMConfigStore store, CompilerToVM vm) {
 495         TreeMap<String, VMField> fields = new TreeMap<>(store.getFields());
 496         for (VMField field : fields.values()) {
 497             if (!field.isStatic()) {
 498                 printConfigLine(vm, "[vmconfig:instance field] %s %s {offset=%d[0x%x]}%n", field.type, field.name, field.offset, field.offset);
 499             } else {
 500                 String value = field.value == null ? "null" : String.format("%d[0x%x]", field.value, field.value);
 501                 printConfigLine(vm, "[vmconfig:static field] %s %s = %s {address=0x%x}%n", field.type, field.name, value, field.address);
 502             }
 503         }
 504         TreeMap<String, VMFlag> flags = new TreeMap<>(store.getFlags());
 505         for (VMFlag flag : flags.values()) {
 506             printConfigLine(vm, "[vmconfig:flag] %s %s = %s%n", flag.type, flag.name, flag.value);
 507         }
 508         TreeMap<String, Long> addresses = new TreeMap<>(store.getAddresses());
 509         for (Map.Entry<String, Long> e : addresses.entrySet()) {
 510             printConfigLine(vm, "[vmconfig:address] %s = %d[0x%x]%n", e.getKey(), e.getValue(), e.getValue());
 511         }
 512         TreeMap<String, Long> constants = new TreeMap<>(store.getConstants());
 513         for (Map.Entry<String, Long> e : constants.entrySet()) {
 514             printConfigLine(vm, "[vmconfig:constant] %s = %d[0x%x]%n", e.getKey(), e.getValue(), e.getValue());
 515         }
 516         for (VMIntrinsicMethod e : store.getIntrinsics()) {
 517             printConfigLine(vm, "[vmconfig:intrinsic] %d = %s.%s %s%n", e.id, e.declaringClass, e.name, e.descriptor);
 518         }
 519     }
 520 




 480     void notifyInstall(HotSpotCodeCacheProvider hotSpotCodeCacheProvider, InstalledCode installedCode, CompiledCode compiledCode) {
 481         for (HotSpotVMEventListener vmEventListener : getVmEventListeners()) {
 482             vmEventListener.notifyInstall(hotSpotCodeCacheProvider, installedCode, compiledCode);
 483         }
 484     }
 485 
 486     @SuppressFBWarnings(value = "DM_DEFAULT_ENCODING", justification = "no localization here please!")
 487     private static void printConfigLine(CompilerToVM vm, String format, Object... args) {
 488         String line = String.format(format, args);
 489         byte[] lineBytes = line.getBytes();
 490         vm.writeDebugOutput(lineBytes, 0, lineBytes.length);
 491         vm.flushDebugOutput();
 492     }
 493 
 494     private static void printConfig(HotSpotVMConfigStore store, CompilerToVM vm) {
 495         TreeMap<String, VMField> fields = new TreeMap<>(store.getFields());
 496         for (VMField field : fields.values()) {
 497             if (!field.isStatic()) {
 498                 printConfigLine(vm, "[vmconfig:instance field] %s %s {offset=%d[0x%x]}%n", field.type, field.name, field.offset, field.offset);
 499             } else {
 500                 String value = field.value == null ? "null" : field.value instanceof Boolean ? field.value.toString() : String.format("%d[0x%x]", field.value, field.value);
 501                 printConfigLine(vm, "[vmconfig:static field] %s %s = %s {address=0x%x}%n", field.type, field.name, value, field.address);
 502             }
 503         }
 504         TreeMap<String, VMFlag> flags = new TreeMap<>(store.getFlags());
 505         for (VMFlag flag : flags.values()) {
 506             printConfigLine(vm, "[vmconfig:flag] %s %s = %s%n", flag.type, flag.name, flag.value);
 507         }
 508         TreeMap<String, Long> addresses = new TreeMap<>(store.getAddresses());
 509         for (Map.Entry<String, Long> e : addresses.entrySet()) {
 510             printConfigLine(vm, "[vmconfig:address] %s = %d[0x%x]%n", e.getKey(), e.getValue(), e.getValue());
 511         }
 512         TreeMap<String, Long> constants = new TreeMap<>(store.getConstants());
 513         for (Map.Entry<String, Long> e : constants.entrySet()) {
 514             printConfigLine(vm, "[vmconfig:constant] %s = %d[0x%x]%n", e.getKey(), e.getValue(), e.getValue());
 515         }
 516         for (VMIntrinsicMethod e : store.getIntrinsics()) {
 517             printConfigLine(vm, "[vmconfig:intrinsic] %d = %s.%s %s%n", e.id, e.declaringClass, e.name, e.descriptor);
 518         }
 519     }
 520 


< prev index next >