Background:
I want to log user activities on Eclipse, for example, what git repositories the users cloned, when did merge conflicts happened, and so on.
I came up with using the OpenJ9 -Xtrace option. First, to test the OpenJ9 -Xtrace option capabilities, I made the following options with OpenJ9: Xtrace Option Builder, and add these options to eclipse.ini
to log cloned git repositories.
-Xtrace:none,maximal={mt{entry},mt{exit},mt{exception}},methods={org/eclipse/jgit/api/CloneCommand.setURI(),org/eclipse/jgit/api/CloneCommand.call()},output="C:\tmp\mytrace.trc"
-Xjit:exclude={org/eclipse/jgit/api/CloneCommand.setURI*|org/eclipse/jgit/api/CloneCommand.call*}
org/eclipse/jgit/api/CloneCommand.setURI()
is a method to set a URI for cloned repository in EGit/JGit.org/eclipse/jgit/api/CloneCommand.call()
is a method to clone the specified repository.
Then I launched Eclipse with -clean
option, clone a repository, and exit Eclipse.
I converted mytrace.trc
with traceformat
command, and got this output in mytrace.trc.fmt
:
Trace Formatted Data
Time (UTC) Thread ID Tracepoint ID Type Tracepoint Data
07:56:41.541990300 *0x0000000001fafe00 mt.0 Entry >org/eclipse/jgit/api/CloneCommand.setURI(Ljava/lang/String;)Lorg/eclipse/jgit/api/CloneCommand; bytecode method, this = 0x7f9788a98
07:56:41.541991900 0x0000000001fafe00 mt.6 Exit <org/eclipse/jgit/api/CloneCommand.setURI(Ljava/lang/String;)Lorg/eclipse/jgit/api/CloneCommand; bytecode method
07:56:41.542010000 0x0000000001fafe00 mt.0 Entry >org/eclipse/jgit/api/CloneCommand.call()Lorg/eclipse/jgit/api/Git; bytecode method, this = 0x7f9788a98
07:56:46.512616000 0x0000000001fafe00 mt.6 Exit <org/eclipse/jgit/api/CloneCommand.call()Lorg/eclipse/jgit/api/Git; bytecode method
07:56:47.631399600 0x0000000001fafe00 dg.262 Debug ***** Thread termination - trace purged *****
This output shows setURI()
method has an argument (Ljava/lang/String;
), but there is no URI that JGit cloned.
Question:
How can I dump the content of method argument with OpenJ9 Xtrace option?