Mercurial > hg > release > thermostat-1.4
changeset 1554:700efd315f0e
Handle JSR/RET bytecode in classes
Reviewed-by: vanaltj
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2014-November/011468.html
author | Omair Majid <omajid@redhat.com> |
---|---|
date | Tue, 18 Nov 2014 14:05:59 -0500 |
parents | 24397a6eba11 |
children | 7b8199115995 |
files | vm-profiler/jvm-agent/src/main/java/com/redhat/thermostat/vm/profiler/agent/jvm/AsmBasedInstrumentor.java |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/vm-profiler/jvm-agent/src/main/java/com/redhat/thermostat/vm/profiler/agent/jvm/AsmBasedInstrumentor.java Tue Nov 18 14:04:56 2014 -0500 +++ b/vm-profiler/jvm-agent/src/main/java/com/redhat/thermostat/vm/profiler/agent/jvm/AsmBasedInstrumentor.java Tue Nov 18 14:05:59 2014 -0500 @@ -43,6 +43,7 @@ import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; import org.objectweb.asm.commons.AdviceAdapter; +import org.objectweb.asm.commons.JSRInlinerAdapter; public class AsmBasedInstrumentor extends ProfilerInstrumentor { @@ -88,11 +89,9 @@ String signature, String[] exceptions) { MethodVisitor mv = cv.visitMethod(access, name, desc, signature, exceptions); - if (mv == null) { - throw new AssertionError("mv is null"); - } if (mv != null) { - mv = new InstrumentingMethodAdapter(mv, className, access, name, desc); + MethodVisitor instrumentor = new InstrumentingMethodAdapter(mv, className, access, name, desc); + mv = new JSRInlinerAdapter(instrumentor, access, name, desc, signature, exceptions); } return mv; }