背景:
我想在 Eclipse 上记录用户活动,例如,用户克隆了哪些 git 存储库,何时发生合并冲突,等等。
我想出了使用 OpenJ9 -Xtrace 选项。首先,为了测试 OpenJ9 -Xtrace 选项功能,我使用 OpenJ9 做了以下选项: Xtrace Option Builder,并将这些选项添加eclipse.ini
到记录克隆的 git 存储库。
-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()
是一种在 EGit/JGit 中为克隆存储库设置 URI 的方法。org/eclipse/jgit/api/CloneCommand.call()
是一种克隆指定存储库的方法。
然后我使用-clean
选项启动 Eclipse,克隆一个存储库,然后退出 Eclipse。我mytrace.trc
用traceformat
命令转换,并得到这个输出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 *****
此输出显示setURI()
方法有一个参数 ( Ljava/lang/String;
),但没有 JGit 克隆的 URI。
问题:
如何使用 OpenJ9 Xtrace 选项转储方法参数的内容?