我想使用 Win32K ETW 提供程序跟踪 Send/PostMessage 的参数。它有相应的事件,但参数
- 信息
- 工作参数
- 参数
始终为空。我是否遗漏了某个开关,或者这些值虽然存在于 ETW 数据中但却从未被记录下来?
提供商有一堆关键字,但即使使用 0xfff 也无法改变这种情况。
Value Keyword Description
0x0000000000000400 AuditApiCalls
0x0000000000000800 CompatImpact
0x0000000000001000 Updates
0x0000000000002000 Focus
0x0000000000004000 UIPI
0x0000000000008000 win32Power
0x0000000000010000 Concurrency
0x0000000000020000 UserActivity
0x0000000000040000 UIUnresponsiveness
0x0000000000080000 ThreadRundown
0x0000000000100000 Rendering
0x0000000000200000 ThreadInfo
0x0000000000400000 MessagePump
0x0000000000800000 MessagePumpInternalAndInput
0x0000000001000000 TouchInput
0x0000000002000000 TimerSurvey
0x0000000004000000 PointerInput
0x0000000008000000 AutoRotation
0x0000000010000000 Contention
0x0000000020000000 TimerInfo
0x0000000040000000 ComponentHosting
0x0000000080000000 TrappedACRendering
0x0000000100000000 Fonts
0x0000000200000000 NullMessages
0x0000000400000000 Visualization
0x0000000800000000 DCompDetails
0x0000001000000000 PrecisionTouchpad
0x0000002000000000 ContentionTelemetry
0x0000004000000000 ProcessInfo
0x0000008000000000 DCompInput
0x0000010000000000 GdiHandleOperation
0x0000020000000000 UserHandleOperation
0x0000040000000000 WriteClipboard
0x0001000000000000 win:ResponseTime Response Time
0x8000000000000000 Microsoft-Windows-Win32k/Tracing
0x4000000000000000 Microsoft-Windows-Win32k/UIPI
0x2000000000000000 Microsoft-Windows-Win32k/Power
0x1000000000000000 Microsoft-Windows-Win32k/Concurrency
0x0800000000000000 Microsoft-Windows-Win32k/Render
0x0400000000000000 Microsoft-Windows-Win32k/Messages
0x0200000000000000 Microsoft-Windows-Win32k/Contention
0x0100000000000000 Microsoft-Windows-Win32k/Operational
要测试它,你需要安装 Windows Performance Toolkit,它带有 xperf
xperf -on proc_thread -start uisession -on Microsoft-Windows-Win32k:0x8400030000240000
xperf -stop -stop uisession && xperf -merge c:\kernel.etl c:\user.etl c:\temp\win32ktrace.etl
然后,您可以将生成的 ETL 文件加载到 WPA 中
答案1
进一步调试后它看起来像
- 信息
- 参数
- 参数
如果消息不是鼠标按钮的“上/下”消息,则全部设置为 0。实际上,对于发送到 Windows 的消息,Win32K 提供程序基本上是无用的。