63 try { 64 if (f.getInt(runtime.getConfig()) == markId) { 65 return f.getName(); 66 } 67 } catch (Exception e) { 68 } 69 } 70 } 71 return CodeCacheProvider.super.getMarkName(mark); 72 } 73 74 /** 75 * Decodes a call target to a mnemonic if possible. 76 */ 77 @Override 78 public String getTargetName(Call call) { 79 Field[] fields = runtime.getConfig().getClass().getDeclaredFields(); 80 for (Field f : fields) { 81 if (f.getName().endsWith("Stub")) { 82 f.setAccessible(true); 83 try { 84 Object address = f.get(runtime.getConfig()); 85 if (address.equals(call.target)) { 86 return f.getName() + ":0x" + Long.toHexString((Long) address); 87 } 88 } catch (Exception e) { 89 } 90 } 91 } 92 return CodeCacheProvider.super.getTargetName(call); 93 } 94 95 @Override 96 public RegisterConfig getRegisterConfig() { 97 return regConfig; 98 } 99 100 @Override 101 public int getMinimumOutgoingSize() { 102 return runtime.getConfig().runtimeCallStackSize; 103 } 104 105 private InstalledCode logOrDump(InstalledCode installedCode, CompiledCode compiledCode) { 106 ((HotSpotJVMCIRuntime) runtime).notifyInstall(this, installedCode, compiledCode); 107 return installedCode; 108 } | 63 try { 64 if (f.getInt(runtime.getConfig()) == markId) { 65 return f.getName(); 66 } 67 } catch (Exception e) { 68 } 69 } 70 } 71 return CodeCacheProvider.super.getMarkName(mark); 72 } 73 74 /** 75 * Decodes a call target to a mnemonic if possible. 76 */ 77 @Override 78 public String getTargetName(Call call) { 79 Field[] fields = runtime.getConfig().getClass().getDeclaredFields(); 80 for (Field f : fields) { 81 if (f.getName().endsWith("Stub")) { 82 f.setAccessible(true); 83 Object address; 84 try { 85 address = f.get(runtime.getConfig()); 86 if (address.equals(call.target)) { 87 return f.getName() + ":0x" + Long.toHexString((Long) address); 88 } 89 } catch (IllegalArgumentException | IllegalAccessException e) { 90 } 91 } 92 } 93 return CodeCacheProvider.super.getTargetName(call); 94 } 95 96 @Override 97 public RegisterConfig getRegisterConfig() { 98 return regConfig; 99 } 100 101 @Override 102 public int getMinimumOutgoingSize() { 103 return runtime.getConfig().runtimeCallStackSize; 104 } 105 106 private InstalledCode logOrDump(InstalledCode installedCode, CompiledCode compiledCode) { 107 ((HotSpotJVMCIRuntime) runtime).notifyInstall(this, installedCode, compiledCode); 108 return installedCode; 109 } |