RE: [abc-users] -O3 runtime error

From: Eric Bodden <eric.bodden@mail.mcgill.ca>
Date: Thu Aug 10 2006 - 22:25:23 BST

Hi.

> thanks for the replies; I noticed the problem with Paddle throwing an
> exception is solved on abc-1.2.1. I have another problem though --
with
> the -O3 flag turned on, and the -Xmx512M VM option, abc seems to run
> forever on my machine -- the most I've tried was going for over 20
> minutes when I shut it down.

I used to have similar problems, too. They were related to my classpath
setup, having conflicting versions of Soot on the classpath. The
following works for Ondrej and me:

======
olhotak@lhotak:~$ java -version
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) Server VM (build 1.5.0_07-b03, mixed mode)
olhotak@lhotak:~$ echo $CLASSPATH
/usr/local/jdk1.5.0_07/jre/lib/rt.jar:/usr/local/jdk1.5.0_07/jre/lib/jce
.jar:.:/home/olhotak/abc-1.2.1-complete.jar
olhotak@lhotak:~$ time java -Xmx1024m abc.main.Main -ext abc.tm -O3
-main-class TmTestMin TmTestMin.java Using BDD package: JeddJavaFactory
Garbage collection #1: 1000003 nodes / 998321 free / 0.101s / 0.101s
total Garbage collection #2: 1000003 nodes / 991669 free / 0.109s /
0.21s total Garbage collection #3: 1000003 nodes / 985107 free / 0.071s
/ 0.281s total <... stuff deleted ...> Garbage collection #67: 1000003
nodes / 809608 free / 0.133s / 7.059s total Garbage collection #68:
1000003 nodes / 808194 free / 0.135s / 7.194s total

real 5m15.327s
user 6m12.711s
sys 0m2.280s
======

So best would be to check your classpath settings. On my machine the
analysis also takes around 6-7 minutes.
 
> I don't actually need my optimization to run on -O3, however, because
> all I need is static information. The glitch seems to be that my
> optimization involves eliminating methods, and it appears that this
can
> only be done from a SceneTransformer. Adding SceneTransformers to the
> "bop" pack doesn't work though, and removing methods from a
> BodyTransformer is equally fruitless.

Well, you don't really need -O3 in order to stick in a particular
analysis. Just have a look at our new ReweavingAnalysis interface. This
allows you to stick in custom analysis as you wish. Also you can use the
standard Soot phase options with +soot and -soot on the abc commandline.
This should allow you to add your Scene transformer to wjtp without
running the (-O3) cflow analysis.

> I fear SceneTransformers can only be added to the "wjtp" pack...is
this
> true? If so, is there a way to remove methods from a BodyTransformer,
> or will -O3 be a requirement? (This might be pushing a little too
hard,
> but is it possible to run -O3 and bypass call graph creation and the
> other "wjtp" optimizations?)

Yes, by using something like the following:

+soot -p wjtp opt1:val1 -p wjtp opt2:val2 -soot

Hope that helps,

Eric
Received on Thu Aug 10 22:25:54 2006

This archive was generated by hypermail 2.1.8 : Mon Aug 28 2006 - 10:20:08 BST