是否有任何工具可视化程序中使用的对象? [英] Are there any tools to visualize the objects being used in a program?

查看:104
本文介绍了是否有任何工具可视化程序中使用的对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定这会有多大用处,但我认为将程序中使用的对象可视化以及从哪里引用哪些对象可能很简洁。我猜它会产生一些像graphviz这样的程序会使用的数据。是否有任何工具可以做到这一点,否则我自己有多难?理想情况下,这适用于任何任意程序,但如果有必要,我可以对代码进行一些修改(例如添加dumpObjects()调用或其他)

I'm not sure how useful this would be, but I thought it might be neat to visualize the objects being used in my program and which objects are being referenced from where. I'm guessing it would generate some data that would be used by a program like graphviz. Are there any tools that do this, otherwise how hard would it be to do this myself? Ideally this would work for any arbitrary program, though if necessary I could make some modifications to the code (such as to add a dumpObjects() call or whatever)

我'我有兴趣为java做这个,但如果有其他语言的解决方案,请发布它们。

I'm interested in doing this for java, but if there are solutions for other languages please post those too.

推荐答案

分析器允许您可以在运行时查看创建的对象。这是JProfiler的输出,例如:

A profiler would allow you to see what objects are created at runtime. This is the output of JProfiler for instance:

jprofiler heap walker http://www.ej-technologies.com/products/jprofiler/images/screenshots/heap_walker_references_fsb.png

这篇关于是否有任何工具可视化程序中使用的对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆