To analyze which functions are invoked in an instance of execution for a program, we can use strace to achieve the goal.

For a java project, if I want to understand the source code, I think some tool like 'strace' can be helpful. I might use it to make out which classes and methods are invoked in an instance of execution for this java program.

But I don't know there is such tool. Is there anyone can give me a recommendation?

  • 1
    strace does see which classes / function are used during runtime. To understand the code I think you need more all the classes / function that can be invoked, so looks like you need more something like a call / caller tree from a static documentation package like doxygen (or javadoc). For doxygen it is not necessary to set document the code, just setting the appropriate configuration variables should give a reasonable output. – albert Oct 3 at 13:17
  • There are plugins for Eclipse and other IDEs that may be able to read code and generate a UML (or similar) diagram. – ivanivan Oct 3 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.