c******n 发帖数: 4965 | 1 I have a jar that contains a Blah class
and in Blah() ctor it somehow calls System.gc()
now let's say I use the jar that contains Blah(), and call new Blah().
I would get the gc(), so I am trying to detect this call ----- I'm not sure
where it called the "new Blah()" and System.gc() . I'm trying to do
through aspectj, by doing a pointcut on System.gc
but the problem is, now if I include the Blah() implementation in my code,
it's able to detect it, but if I just include the Blah() jar, it can't weave
and detect it.
I tried adding the -javaagent:aspectjweaver.jar , but it doesn't work
Thanks | T*********g 发帖数: 496 | 2 any detail for ur pointcut, advice, and eng?
sure
weave
【在 c******n 的大作中提到】 : I have a jar that contains a Blah class : and in Blah() ctor it somehow calls System.gc() : now let's say I use the jar that contains Blah(), and call new Blah(). : I would get the gc(), so I am trying to detect this call ----- I'm not sure : where it called the "new Blah()" and System.gc() . I'm trying to do : through aspectj, by doing a pointcut on System.gc : but the problem is, now if I include the Blah() implementation in my code, : it's able to detect it, but if I just include the Blah() jar, it can't weave : and detect it. : I tried adding the -javaagent:aspectjweaver.jar , but it doesn't work
|
|