score:1

Accepted answer

how can i dump the content of method argument with openj9 xtrace option?

your option only enables entry, exit, and exception method trace tracepoints. method arguments are printed under a different tracepoint. if you use this option instead you should see the additional trace entries containing the arguments.

however, while the values of primitive arguments are shown in the trace, when the argument is an object you will only see the address of the object on the java heap. for example, when tracing calls to *.println() you will see something like this:

15:31:13.710 0x33acc00              mt.18       - this: java/io/printstream@00000000fff04ae0 method arguments: (java/lang/string@00000000e0002768)

my understanding is that the limitation is due to the architecture of the xtrace engine, and the performance impact of resolving objects such as strings and storing them in the trace buffers.

while addresses can be extremely useful for locating objects of interest in the java heap, for example when using eclipse memory analyzer to look at an associated system dump, xtrace cannot provide the functionality you are aiming for.

a alternative approach would be to use a java agent to modify (instrument) the org/eclipse/jgit/api/clonecommand class at runtime to add logging code to the .seturi() method.


Related Query

More Query from same tag