我如何知道 Eclipse 插件使用了多少内存(单独)
有没有办法知道每个 Eclipse 插件分别消耗了多少内存?
Is there a way to know how much memory is consumed by each Eclipse plugin separately?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
获取堆转储并使用 Eclipse Memory Analyser 等进行分析。
有关详细信息,请参阅 使用内存分析器分析 Equinox 捆绑包依赖性
Take a heap dump and analyse it with e.g. the Eclipse Memory Analyser.
For more information, see Analyzing Equinox Bundle Dependencies with Memory Analyzer
如果这是可能的,我会感到非常惊讶,因为您必须有一种明确的方法来确定哪个插件“拥有”堆上的特定对象。
I would be quite surprised if this were possible, because you would have to have an unambiguous way of determining which plugin "owned" a particular object on the heap.
Eclipse 3.1 有一个内置的内存监视器(又名堆状态)插件,它是 org.eclipse.ui.workbench_3.1.0.jar 的一部分。您必须在调试模式下运行 Eclipse 才能看到右下角的监视器。
另请检查 FreeMem 插件:FreeMem 插件
在 Eclipse 中,您可以卸载-->测量内存-->安装-->重复循环
这样您就可以了解每个插件的任何/所有内存利用率。
祝这个任务好运。 我有兴趣查看结果,因为我发现某些插件比其他插件使用更多的内存。
Eclipse 3.1 has a built-in Memory Monitor (aka Heap Status) Plugin, which is a part of org.eclipse.ui.workbench_3.1.0.jar You have to run Eclipse in debug mode for seeing the monitor in right lower corner.
Also check FreeMem plugin:FreeMem plugin
In Eclipse you can uninstall-->measure memory-->install-->repeat cycle
That way you can find out about any/all memory utilization of each plugin.
Good luck with this task. I'd be interested to see the results because I see that some plugins utilize much more memory then others.
我不知道任何通用答案,但也许可以获得某些插件的内存使用情况:当框架按需加载插件时,如果您可以在插件激活之前和之后读取堆大小,它可能会给出一个想法。
要检查加载了哪些插件,可以在 OSGi 控制台中使用“ss”命令。
I don't know any generic answer but maybe it is possible to get the memory usage of some plugins: as the framework loads plugins on demand if you can read the heap size before and after the activation of the plugin it might give an idea.
To check which plugins are loaded, the 'ss' command can be used in the OSGi console.