Lately I've been tracing Win32 Window Messages using ETW (logman, xperf, WPA, et cetera) which is relatively straightforward because the Microsoft-Windows-Win32k provider exports ETW events for SendMessage, TranslateMessage, DispatchMessage, etc.
...but today I needed to perform a similar trace on a Windows 7 SP1 machine, and to my surprise the Windows 7 version of the Microsoft-Windows-Win32k provider is very anemic - it only exposes coarser-level events - and reports errors in window-message processing (e.g. UIPIMsgError), but not window-messages themselves.
After some quick-research, apparently Microsoft-Windows-Win32k didn't surface Window Messages events until Windows 10's first release in 2015, meaning it wasn't possible to use ETW to capture this information in Windows 8.1, Windows 7, Vista or XP.
...but collecting that data is essential for many kinds of debugging and troubleshooting tasks. For trivial or smaller troubleshooting situations we have Spy++ which reports all window-messages received by any other window (and I'm already familiar with how Spy++ works internally) but that makes Spy++ unsuitable for large-scale dragnet-style traces of Window Messages, not to mention how Spy++ doesn't timestamp Window Messages with high-precision timestamps either.
So... just how did performance-engineers or troubleshooters doing causality analysis accurately bulk-record Window Messages prior to Windows 10?