运行时信息 ETW 事件
这些 ETW 事件记录有关运行时的信息,其中包括 SKU、版本号、运行时的激活方式、用于启动运行时的命令行参数、GUID(如果适用),以及其他相关的信息。 如果一个进程中执行多个运行时,则这些事件提供的信息 (ClrInstanceID) 可帮助消除运行时歧义。
下表显示两个运行时信息事件。 可以通过任何关键字或掩码引发这些事件。 (有关更多信息,请参见 CLR ETW 关键字和级别。)
Event |
事件 ID |
提供程序 |
说明 |
---|---|---|---|
RuntimeInformationEvent |
187 |
CLRRuntime |
加载运行时引发。 |
RuntimeInformationDCStart |
187 |
CLRRundown |
枚举所加载的运行时。 |
下表显示事件数据。
字段名 |
数据类型 |
说明 |
---|---|---|
ClrInstanceID |
win:UInt16 |
CLR 或 CoreCLR 的实例的唯一 ID。 |
Sku |
win:UInt16 |
1 – 桌面 CLR。 2 – CoreCLR。 |
BclVersion – Major Version |
win:UInt16 |
mscorlib.dll 的主版本号。 |
BclVersion – Minor Version |
win:UInt16 |
mscorlib.dll 的次版本号。 |
BclVersion – Build Number |
win:UInt16 |
mscorlib.dll 的内部版本号。 |
BclVersion – QFE |
win:UInt16 |
mscorlib.dll 的修补程序版本号。 |
VMVersion – Major Version |
win:UInt16 |
clr.dll 或 coreclr.dll 的版本号,具体取决于 SKU。 |
VMVersion – Minor Version |
win:UInt16 |
clr.dll 或 coreclr.dll 的次版本号,具体取决于 SKU。 |
VMVersion – Build Number |
win:UInt16 |
clr.dll 或 coreclr.dll 的内部版本号。 |
VMVersion – QFE |
win:UInt16 |
clr.dll 或 coreclr.dll 的修补程序版本号。 |
StartupFlags |
win:UInt32 |
mscoree.h 中定义的启动标志。 |
StartupMode |
win:UInt8 |
0x01 - 托管的可执行文件。 0x02 - 承载的 CLR。 0x04 - C++ 托管互操作。 0x08 - 已激活 COM。 0x10 - 其他。 |
CommandLine |
win:UnicodeString |
仅当 StartupMode=0x01 时才不为 null。 |
ComObjectGUID |
win:GUID |
仅当 StartupMode=0x08 时才不为 null。 |
RuntimeDLLPath |
win:UnicodeString |
已加载到进程中的 CLR .dll 文件的路径。 |