dacapo in progress

I run my first agent on dacapo, and it works.

need to further figure out whether I miss some classes by the customized class loader (review code of tamiflex).


The agent detects how many objects are created. It is extended from others' tool.

1) I move the instantiation of samplers from client classes into agent's premain(). Clearly, the samplers will also take effect in the period from the agent's premain() to client class's main().

2) run the agent: java -javaagent=gen.jar -jar dacapo.jar avrora




Trace:

...

I just allocated the object ./scratch/test/tinyos/CntToRfm.elf of type java/io/File whose size is 16
I just allocated the object ./scratch/test/tinyos/RfmToLeds.elf of type java/io/File whose size is 16
I just allocated the object  of type java/lang/StringBuilder whose size is 16
===== DaCapo 9.12 avrora starting I just allocated the object  of type java/lang/StringBuilder whose size is 16
=====



======================================

review for the treament in tamiflex project of classes loaded by customer class loader:

All you need to do is add a transformer to the instrumentor instance (given as an argument in premain).

Then, the instrumentor will internally transform all classes loaded by all classloaders.

It transforms by invoking the transform(classloader, class,...) provided by each transformer class.

As seen, any class loaded by any classloader is transformed and the relevant information is passed by the jvm to  the arguments.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值