Too long method Code length after instrumentation with ASM

Sergey Vorobyev <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
Hi asm-users,
We use asm-3.2 framework in our open-source java-race-detector
http://code.google.com/p/java-thread-sanitizer/
I face with a number of problems. One is that after instrumentation I get
classes with too long methods code (more than 65536 bytes).
For example, this exception we have on DaCapo fop benchmark
http://www.dacapobench.org/.

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.dacapo.harness.Fop.iterate(Unknown Source)
        at org.dacapo.harness.Benchmark.run(Unknown Source)
        at org.dacapo.harness.TestHarness.runBenchmark(Unknown Source)
        at org.dacapo.harness.TestHarness.main(Unknown Source)
        at Harness.main(Unknown Source)
Caused by: java.lang.ClassFormatError: Invalid method Code length 186550 in
class file org/apache/fop/fonts/CodePointMapping
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at org.dacapo.harness.DacapoClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
        at org.apache.fop.fonts.base14.Helvetica.<init>(Unknown Source)
        at org.apache.fop.fonts.FontSetup.setup(Unknown Source)
        at org.apache.fop.render.PrintRenderer.setupFontInfo(Unknown Source)
        at org.apache.fop.area.RenderPagesModel.<init>(Unknown Source)
        at org.apache.fop.area.AreaTreeHandler.setupModel(Unknown Source)
        at org.apache.fop.area.AreaTreeHandler.<init>(Unknown Source)
        at
org.apache.fop.render.RendererFactory.createFOEventHandler(Unknown Source)
        at org.apache.fop.fo.FOTreeBuilder.<init>(Unknown Source)
        at org.apache.fop.apps.Fop.createDefaultHandler(Unknown Source)
        at org.apache.fop.apps.Fop.<init>(Unknown Source)
        at org.apache.fop.apps.FopFactory.newFop(Unknown Source)
        at org.apache.fop.cli.InputHandler.renderTo(Unknown Source)
        at org.apache.fop.cli.Main.startFOP(Unknown Source)
        ... 9 more

I didn't find any way to check methods length in runtime and discard
instrumentation if method too long. Can you tell me - is this way exists?
How must I work with too long methods?

Many thanks,
Sergey Vorobyev
SWE, Google Inc.
message-footer.txt (text/plain, 238 B)
-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.