Skip to content

Problem using Booster and the play-out agent #1

Description

@gkastrinis

I am trying to run the play-out agent on a jar, get the reflection log and then use the booster jar to create a new jar. During those steps I encounter various issues.

Reflect.jar is produced from this file
https://bitbucket.org/yanniss/doop-benchmarks/src/f9b3ea7e8d0e909777b2ee459b614b80c8b75e74/demos/src/hello/Reflect.java?at=default against jre1.6.


> java -version
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
>  java -javaagent:poa-2.0.1.jar -jar Reflect.jar
============================================================
TamiFlex Play-Out Agent Version 2.0.1
Loaded properties from /home/gkastrinis/.tamiflex/poa.properties
============================================================
Hey
Excepted exception.
Test30: Expected exception.
Reachable Test31 okay
Exception in thread "Thread-0" de.bodden.tamiflex.normalizer.ClassRenamer$NoHashedNameException: $Proxy
        at de.bodden.tamiflex.normalizer.Hasher$2$1.remapStringConstant(Hasher.java:90)
        at de.bodden.tamiflex.normalizer.RemappingStringConstantAdapter.visitLdcInsn(RemappingStringConstantAdapter.java:32)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        at de.bodden.tamiflex.normalizer.Hasher.generateHashNumber(Hasher.java:99)
        at de.bodden.tamiflex.playout.ClassDumper.writeClassesToDisk(ClassDumper.java:82)
        at de.bodden.tamiflex.playout.Agent$1.run(Agent.java:122)

If instead I use java 8, it works ok.

>  java8 -version
openjdk version "1.8.0_31"
OpenJDK Runtime Environment (build 1.8.0_31-b13)
OpenJDK 64-Bit Server VM (build 25.31-b07, mixed mode)
>  java8 -javaagent:poa-2.0.1.jar -jar Reflect.jar
============================================================
TamiFlex Play-Out Agent Version 2.0.1
Loaded properties from /home/gkastrinis/.tamiflex/poa.properties
============================================================
Hey
Excepted exception.
Test30: Expected exception.
Reachable Test31 okay

============================================================
TamiFlex Play-Out Agent Version 2.0.1
Found no new log entries.
Log file written to: /home/gkastrinis/tamiflex/out/refl.log
============================================================

Then I try to use the results with the booster jar.

>  java8 -jar booster-2.0.1.jar -p cg reflection-log:out/refl.log -cp out -main-class Reflect Reflect
TamiFlex Booster Version 2.0.1
Soot started on Mon Mar 23 15:29:07 EET 2015
Exception in thread "main" java.lang.RuntimeException: Line: 'Class.getDeclaredField;<Test33: java.lang.Object o>;Test33.run;782;isAccessible=false;'
        at soot.Scene.addReflectionTraceClasses(Scene.java:1033)
        at soot.Scene.loadBasicClasses(Scene.java:985)
        at soot.Scene.loadNecessaryClasses(Scene.java:1060)
        at soot.Main.run(Main.java:167)
        at soot.Main.main(Main.java:141)
        at de.bodden.tamiflex.booster.ReflInliner.main(ReflInliner.java:53)
Caused by: java.lang.RuntimeException: Unknown entry kind: Class.getDeclaredField
        at soot.Scene.addReflectionTraceClasses(Scene.java:1030)
        ... 5 more

Am I missing some step in the process? Thanks in advance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions