Ticket #4 (assigned defect)

Opened 4 months ago

Last modified 4 months ago

Error thrown when running on dacapo bloat benchmark

Reported by: anonymous Assigned to: jwloka (accepted)
Priority: major Milestone: M2
Component: dila.runner Version: 0.0.2
Keywords: Cc:

Description

I see an Error thrown by Dila when running on the dacapo bloat benchmark. To reproduce, follow the instructions in Ticket 2, except use the following command line:

java -Xmx1000M -cp dacapo-2006-10-MR2.jar:/Users/manu/workspaces/dilaWorkspace/dila.javaagent/lib/agent.jar dila.wrapper.Dila Harness TestsRun.cfg -s small bloat

The error stack trace is as follows:

java.lang.Error: Should not happen: Static dispatch target could not be found!
	at dila.common.graphs.cg.Hierarchy.getTarget(Hierarchy.java:151)
	at dila.instrumentation.cg.CallGraphBuilder.beforeMethodCallExternal(CallGraphBuilder.java:205)
	at dila.instrumentation.cg.CallGraphBuilder.externalMethodCallBefore(CallGraphBuilder.java:390)
	at EDU.purdue.cs.bloat.optimize.Main.main(Main.java:425)
	at dacapo.bloat.BloatHarness.iterate(BloatHarness.java:25)
	at dacapo.Benchmark.run(Benchmark.java:126)
	at dacapo.TestHarness.runBenchmark(TestHarness.java:302)
	at dacapo.TestHarness.main(TestHarness.java:242)
	at Harness.main(Harness.java:5)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at dila.wrapper.AbstractWrapper.executeProgram(AbstractWrapper.java:155)
	at dila.wrapper.Dila.main(Dila.java:107)

I set a breakpoint there, and it looks like the dispatch map for

loadClass(Ljava/lang/String;)LEDU/purdue/cs/bloat/reflect/ClassInfo;

is missing an entry for class

LEDU/purdue/cs/bloat/context/BloatContext;

Before running, you may want to comment out the two method calls that dump output before the error is thrown in Hierarchy; for me, those lines dumped around 50MB of output.

Change History

04/18/08 20:10:23 changed by jwloka

  • status changed from new to assigned.

04/20/08 23:41:27 changed by jwloka

  • component changed from dila.common to dila.wrapper.

I couldn't really reproduce the error, but maybe its cause. The BLOAT benchmark uses a ClassFileLoader? to locate class files for given class names. When the benchmark is run by Dila the classpath used in ClassFileLoader? does not contain any class of the BLOAT benchmark application. See stack trace below:

java.lang.RuntimeException?: Class not found: EDU/purdue/cs/bloat/trans/ValueNumbering java.lang.RuntimeException?: Class not found: EDU/purdue/cs/bloat/trans/ValueNumbering

at EDU.purdue.cs.bloat.editor.ClassHierarchy?.addClass(ClassHierarchy?.java:386) at EDU.purdue.cs.bloat.editor.ClassHierarchy?.addClassNamed(ClassHierarchy?.java:116) at EDU.purdue.cs.bloat.context.PersistentBloatContext?.addClasses(PersistentBloatContext?.java:116) at EDU.purdue.cs.bloat.context.CachingBloatContext?.<init>(CachingBloatContext?.java:70) at EDU.purdue.cs.bloat.optimize.Main.main(Main.java:413) at dacapo.bloat.BloatHarness?.iterate(BloatHarness?.java:25) at dacapo.Benchmark.run(Benchmark.java:126) at dacapo.TestHarness?.runBenchmark(TestHarness?.java:302) at dacapo.TestHarness?.main(TestHarness?.java:242) at Harness.main(Harness.java:5) at sun.reflect.NativeMethodAccessorImpl?.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl?.invoke(NativeMethodAccessorImpl?.java:39) at sun.reflect.DelegatingMethodAccessorImpl?.invoke(DelegatingMethodAccessorImpl?.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at dila.wrapper.AbstractWrapper?.executeProgram(AbstractWrapper?.java:147) at dila.wrapper.Dila.main(Dila.java:108)

I'm not aware of any modification of the application's classpath, but I'll try to figure why it's classpath is different.