diff --git a/README.md b/README.md index a377734..6f1b442 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,18 @@ find . -name '*.java' -print -exec javac -d ../../out/production/profiler \{\} \ cd ../.. ``` -## Run application with agent +## Application + +### Compile the application ```shell -java -javaagent:agent/agent.jar=hello -cp out/production/application:out/production/profiler ch.usi.inf.sp.dbi.Application +cd application/src +find . -name '*.java' -print -exec javac -d ../../out/production/application \{\} \; +cd ../.. +``` + +### Run application with agent + +```shell +java -javaagent:agent/agent.jar=hello -cp out/production/application -Xbootclasspath/p:out/production/profiler ch.usi.inf.sp.dbi.Application ``` \ No newline at end of file diff --git a/agent/src/ch/usi/inf/sp/dbi/agent/ClassTransformer.java b/agent/src/ch/usi/inf/sp/dbi/agent/ClassTransformer.java index 4a5d821..3d5b925 100644 --- a/agent/src/ch/usi/inf/sp/dbi/agent/ClassTransformer.java +++ b/agent/src/ch/usi/inf/sp/dbi/agent/ClassTransformer.java @@ -44,6 +44,7 @@ public class ClassTransformer implements ClassFileTransformer { byte[] classfileBuffer) throws IllegalClassFormatException { if (className.startsWith("java/") || className.startsWith("sun/") || + className.startsWith("jdk/") || className.startsWith("ch/usi/inf/sp/dbi/agent/") || className.startsWith("ch/usi/inf/sp/dbi/profiler/")) { System.out.println("Skipping class <" + loader + ", " + className + ">");