开发者

Can Java Interactive Profiler profile osgi bundles?what is the workaround?

开发者 https://www.devze.com 2023-03-07 23:56 出处:网络
you need to specify 开发者_StackOverflow中文版classloader to select classes to profile in JIP.But in OSGi platform each bundle has separate class loader which is decided dynamically. JIP has its own a

you need to specify 开发者_StackOverflow中文版classloader to select classes to profile in JIP.But in OSGi platform each bundle has separate class loader which is decided dynamically. JIP has its own advantages.How do other profilers (yourkit,visualvm ) provide profiling for osgi bundles?


The profilers I've worked with do byte code manipulation that will inject their code in your classes. When you perform that on bundles, suddenly these bundles have a dependency on these extra classes which is resolved by putting those bundles on either the bootclasspath (the easiest, but also most implicit way) or exposing them via the system bundle (more explicit, but it requires your annotated bundles to import those classes/packages).


Try to look at http://code.google.com/p/jip-osgi/. It is described as based on jip profiler that allows to monitor resources in OSGi application.

0

精彩评论

暂无评论...
验证码 换一张
取 消