Mercurial > hg > graal-compiler
changeset 23155:ff575266cf15
createBenchmarkCounters: throw exception if benchmark counter are not enabled.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Fri, 11 Dec 2015 10:49:11 +0100 |
parents | f2a8407253da |
children | 1280145e678f |
files | graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotLIRGenerator.java |
diffstat | 2 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Thu Dec 10 18:22:07 2015 +0100 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Fri Dec 11 10:49:11 2015 +0100 @@ -615,7 +615,7 @@ if (BenchmarkCounters.enabled) { return new AMD64HotSpotCounterOp(name, group, increment, getProviders().getRegisters(), config, getOrInitRescueSlot()); } - return null; + throw JVMCIError.shouldNotReachHere("BenchmarkCounters are not enabled!"); } @Override @@ -623,7 +623,7 @@ if (BenchmarkCounters.enabled) { return new AMD64HotSpotCounterOp(names, groups, increments, getProviders().getRegisters(), config, getOrInitRescueSlot()); } - return null; + throw JVMCIError.shouldNotReachHere("BenchmarkCounters are not enabled!"); } @Override
--- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotLIRGenerator.java Thu Dec 10 18:22:07 2015 +0100 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotLIRGenerator.java Fri Dec 11 10:49:11 2015 +0100 @@ -494,18 +494,16 @@ public LIRInstruction createBenchmarkCounter(String name, String group, Value increment) { if (BenchmarkCounters.enabled) { return new SPARCHotSpotCounterOp(name, group, increment, getProviders().getRegisters(), config); - } else { - return null; } + throw JVMCIError.shouldNotReachHere("BenchmarkCounters are not enabled!"); } @Override public LIRInstruction createMultiBenchmarkCounter(String[] names, String[] groups, Value[] increments) { if (BenchmarkCounters.enabled) { return new SPARCHotSpotCounterOp(names, groups, increments, getProviders().getRegisters(), config); - } else { - return null; } + throw JVMCIError.shouldNotReachHere("BenchmarkCounters are not enabled!"); } public AllocatableValue getSafepointAddressValue() {