Java Interactive Profiler 可以分析 osgi 包吗?解决方法是什么?
您需要指定类加载器来选择要在 JIP 中分析的类。但是在 OSGi 平台中,每个包都有单独的类加载器,该类加载器是动态决定的。 JIP 有其自身的优势。其他分析器(yourkit、visualvm)如何提供 osgi 包的分析?
you need to specify 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我使用过的探查器进行字节码操作,将其代码注入到您的类中。当您在捆绑包上执行此操作时,突然这些捆绑包对这些额外的类产生了依赖性,可以通过将这些捆绑包放在 bootclasspath 上(最简单,但也是最隐式的方式)或通过系统捆绑包公开它们(更明确,但它需要您带注释的包来导入这些类/包)。
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).
尝试查看 http://code.google.com/p/jip-osgi/。它被描述为基于 jip 分析器,允许监视 OSGi 应用程序中的资源。
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.