Multithreaded call hierarchy by time

I am using eclipse to write java code. If I debug some code, I can set a breakpoint and follow along as the code goes through each of the functions, or I can go back. I can also look at the call hierarchy or links to get an idea. But this is not enough.

I would like to have some kind of temporary visualization of what each thread is doing along the way ... let's say "point A" (clicking a button on the interface) to "point B" (getting the result). I want to see what classes / methods were called in what order. I want a nice way to visualize what kind of output is coming from one method and go to another method that starts a new process ... etc.

Is the profiler only available for this kind of rendering? Basically, I want to create an action diagram or flowchart. Is there some plugin or application that can generate something like this?

Edit: Here's an example of what I think ... at least visually: essmodel.sourceforge.net/index.html This has some flow of where the code is leading. But I think this is just a static map of which classes lead to other classes and which I / O options are available. I would like to display a stream based on a specific case.

+3


source to share


2 answers


JProfiler offers this view, which he calls "Call tracer":

enter image description here



It is important to limit filters very carefully so as not to write a lot of data.

Disclaimer: My company is developing JProfiler.

+3


source


I believe using a profiler would be your best option. Are you familiar with VisualVM? It comes with a JDK (look for "jvisualvm.exe" inside your JDK bin directory) and is capable of automatically profiling local virtual machines as well as remote computers when configured correctly. And that gives a pretty quick overview of what threads are running and the code they spend their time in, so I think you could easily do what you need from it. And best of all, it's free :)

As I said, local grading is a breeze. You just run JVisualVM.exe separately and it will find all and all java processes running on the local machine automatically (you can just select them from the menu that VisualVM gives you in advance). If you want to remotely configure a profile, provide the following virtual machine arguments for what you are using:



-Dcom.sun.management.jmxremote.port=[0-65535]
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

      

Then, in VisualVM, use the hostname of the machine that your remote JVM is running on and the port that you configured in the first VM argument above.

0


source







All Articles