works
This commit is contained in:
parent
a723a02fdd
commit
604bb84031
2 changed files with 13 additions and 2 deletions
14
README.md
14
README.md
|
@ -26,8 +26,18 @@ find . -name '*.java' -print -exec javac -d ../../out/production/profiler \{\} \
|
||||||
cd ../..
|
cd ../..
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run application with agent
|
## Application
|
||||||
|
|
||||||
|
### Compile the application
|
||||||
|
|
||||||
```shell
|
```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
|
||||||
```
|
```
|
|
@ -44,6 +44,7 @@ public class ClassTransformer implements ClassFileTransformer {
|
||||||
byte[] classfileBuffer) throws IllegalClassFormatException {
|
byte[] classfileBuffer) throws IllegalClassFormatException {
|
||||||
if (className.startsWith("java/") ||
|
if (className.startsWith("java/") ||
|
||||||
className.startsWith("sun/") ||
|
className.startsWith("sun/") ||
|
||||||
|
className.startsWith("jdk/") ||
|
||||||
className.startsWith("ch/usi/inf/sp/dbi/agent/") ||
|
className.startsWith("ch/usi/inf/sp/dbi/agent/") ||
|
||||||
className.startsWith("ch/usi/inf/sp/dbi/profiler/")) {
|
className.startsWith("ch/usi/inf/sp/dbi/profiler/")) {
|
||||||
System.out.println("Skipping class <" + loader + ", " + className + ">");
|
System.out.println("Skipping class <" + loader + ", " + className + ">");
|
||||||
|
|
Reference in a new issue