0

Is there a way to get textual output of every method invoked by the JVM at runtime?

jayunit100
  • 17,388
  • 22
  • 92
  • 167

4 Answers4

1

If you are using Eclipse you can right click the method and choose "Open call hierarchy"

I am not very sure if you are looking for ASM, it is used for analyzing the bytecodes

ASM is an all purpose Java bytecode manipulation and analysis framework. It can be used to modify existing classes or dynamically generate classes, directly in binary form. Provided common transformations and analysis algorithms allow to easily assemble custom complex transformations and code analysis tools.

ASM offer similar functionality as other bytecode frameworks, but it is focused on simplicity of use and performance. Because it was designed and implemented to be as small and as fast as possible, it makes it very attractive for using in dynamic systems*.

Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331
1

My suggestion is please use debugger to see the whole process is being done.

Piyush
  • 68
  • 7
1

You can write a CGLIB proxy to trace your methods.

Amir Kost
  • 2,148
  • 1
  • 16
  • 30
0

You should use Java profiler tool. There are two well-known profilers - YourKit Java Profiler and JProfiler.

I prefer first one, but you can try both and make your choice.

Nikolay
  • 1,949
  • 18
  • 26