• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to generate dynamic call graph?  RSS feed

 
isbc chen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This test code is below:

There exists any tool that can generate the detail method call from main() to println()?

Thanks.
 
Richard Tookey
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create an exception object and print the associated stack trace.
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is called the call stack, rather than a graph. A graph is something different.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not clear on what you're asking. What output would you expect for this example?
 
isbc chen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Output is call graph or Tree.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post what it would look like in this case.
 
Richard Tookey
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
isbc chen wrote:Output is call graph or Tree.


Many years ago I used Together 6 to reverse engineer a UML sequence diagram for a large(ish) project. A sequence diagram is a call sequence graph but be aware that it can be excessively verbose. Together 6 did allow some filtering but the result was usually too verbose to be any real use. Last I heard was that Together is now available as "Borland Together".

I bet Rational Rose have a similar reverse engineering tool.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
isbc chen wrote:
There exists any tool that can generate the detail method call from main() to println()?

If you are using Eclipse, set a break point and in the debug perspective, use Step Into (F5)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!