Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to draw callgraph for gprof output gmon.out using linuxtools callgraph plugin #350

Open
fanghuaqi opened this issue Mar 27, 2024 · 5 comments

Comments

@fanghuaqi
Copy link

Hello, I see gprof also provide call graph features but its call graph is just show in excel like format, which cannot render as a graph which provided by systemtap callgraph plugin as described https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.linuxtools.callgraph.docs%2FLinux_Tools_Project%2FCallgraph%2FUser_Guide%2FGeneral-Usage2.html

image

Is it possible to use the gprof parsed call graph to draw call graph using this plugin, can somebody give me some hints about how to achieve it.

There is a python script https://github.com/jrfonseca/gprof2dot to draw call graph using gmon.out like this below, I think it might be possible to achieve same effect using existing linux tools's callgraph plugin

image

Thanks

@fanghuaqi
Copy link
Author

Could someone help me with this issue, if it is possible, we can help to implement it by reuse this

@jjohnstn
Copy link
Contributor

Hello @fanghuaqi The Callgraph plug-in is configured to use SystemTap data so no, you can't just ask it to read gprof data. That said, you could start by copying the linuxtools/systemtap/org.eclipse.linuxtools.callgraph code and modifying the content providers etc. I would suggest start with the StapGraph.java code and creating a new content provider. You will have to look if you can reuse the data format of the StapTreeContentProvider which obviously would save a lot of work. From there, you can work at changing things as needed or deleting them if they don't apply.

Unfortunately, Linux Tools is in maintenance mode which means we don't have coding resources to allocate to help you in a major feature addition. We can help you via answering questions and we can also help you to get your code into the Linux Tools repo and simrel offerings.

@fanghuaqi
Copy link
Author

Hi @jjohnstn , thank you for your explanation, we will investigate it under your suggestion. By the way, since this tool is maintenance mode, do you know is there any other performance analyze tools in eclipse cdt environment?

@jjohnstn
Copy link
Contributor

Hi @fanghuaqi I don't know of any off the top of my head. We still maintain the tools (e.g. we have updated gprof/gcov tools to handle new gcc and we have recently updated Docker Tooling to support the latest version of Docker). We just don't have resource allocation to do major work such as create a new plug-in or work on a major feature addition to an existing plug-in. We are always happy to accept contributions.

@fanghuaqi
Copy link
Author

Hi @jjohnstn, thanks, we will take a look at how to enable gprof call graph feature in eclipse linux tools repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants