r/cpp • u/mropert • Feb 14 '26
Profiling on Windows: a Short Rant · Mathieu Ropert
https://mropert.github.io/2026/02/13/profiling_on_windows/
56
Upvotes
r/cpp • u/mropert • Feb 14 '26
2
u/ack_error Feb 15 '26
Funny, my experience has been that VTune's Microarchitecture Exploration doesn't work on anything newer than an 11th gen CPU either. It worked great on a Tiger Lake system, but after upgrading to Raptor Lake I've been getting nothing but bogus results from Microarchitecture Exploration like every single function having the same vector usage metric (~22%, 67%, etc). Temporarily disabling Defender and VBS helped a little bit but the results are nowhere near reliable. I've resorted to just using Profile Explorer instead as it's lighter weight and faster than VTune for pure CPU profiling.
30
u/Prestigious-Bet8097 Feb 14 '26
"I heard good things from Tracy but sadly I cannot get past the imgui feel of the interface."
Then I guess you made your choice, but don't expect sympathy for your self-inflicted injuries.
54
u/fdwr fdwr@github 🔍 Feb 14 '26
Sigh, in a day where open-source projects can offer their old releases for over a decade, surely companies can offer their previous releases more than 5 years. I get the "no tech support for you" aspect, but at least hosting the older files (it's cheap) would be the decent thing to do. Otherwise when software devs demand more recent hardware, we're just contributing to ewaste 😢.
31
u/Romop5 Feb 14 '26
At my main job (3D military simulators), we use Tracy almost everywhere and I can’t think of any replacement for it.
We have it turned on all the time as it doesn’t affect our engine’s performance that much, so it’s super easy to start up Tracy and start profiling anytime once the visualization starts tearing or FPS drops.
In the past, I’ve always used VS’s Profiler or VTune, but I could always obtain just hot path / hot section analysis. With Tracy, it’s super easy to find out where parallelism is reduced to sequential computation.
18
u/James20k P2005R0 Feb 14 '26
The weirdest thing about dropping support for older CPUs is that.. we still need to profile on older CPUs. Customers do not by and large have particularly new CPUs, which means that if a performance problem crops on their systems? You absolutely need a way to debug it with modern tooling. Its odd that we consider supporting even slightly out of date hardware as a legacy problem for tooling
For game development, I set up a test bench with whatever the minimum supported oldest hardware configuration is, and then I do extensive checks against that to make sure that everything's working properly in a controlled environment. Modern CPUs can have very different performance characteristics to old CPUs, and especially the combination of old CPU + old GPU
I think part of the problem is that the direction of the industry at the moment is not one where your customers are primarily regular human beings anymore, and tooling is shifting to match. So legacy hardware is ~2-3 years old, not 8-10 years old now
6
u/IcyWindows Feb 14 '26
There's also Visual Studio and there is Windows Performance Analyzer.
3
u/ReDucTor Game Developer | quiz.cpp-perf.com Feb 14 '26
Profiling tools are a mess, its would be good to have something which does better performance monitoring counter (PMC) support, however if your unlucky you might also get caught like I did with one machine the motherboard manufacturer refused to provide the ability to turn on PMC support so it meant that just normal sampling was the only way.
If I suspect something that I might want to dig into microarchitecture wise I will look at it in llvm-mca, normally the sampling profiler giving me a good indication where in the function might be worth looking at, however llvm-mca wont give you much memory wise so you wont see things like true sharing or false sharing.
7
u/vI--_--Iv Feb 14 '26
In other words, one particular vendor pumped up hardware requirements of their own software.
This, of course, justifies the clickbaity "Profiling on Windows" title.
1
u/frnxt Feb 14 '26
While I don't think it's going to work for microarchitecture profiling, I really got great results out of UIforETW. Sadly it's incompatible with the recent releases of Windows Performance Analyzer, which further proves your rant.
(You'd think something like this would be included in Visual Studio, which we pay big money for. And that WPA would bundle some of UIforETW's views — they're really great as a "poor person's Tracy" especially because you can run profiling with a multithread timeline even on binaries you don't control at all!)
1
u/VoidVinaCC Feb 16 '26 edited Feb 17 '26
You can use microsoft/profile-explorer: CPU profiling trace viewer which is a far more user friendly tool to use ETW, which can use the PMU for uarch counters
-1
u/FlyingRhenquest Feb 14 '26
Sure, sure, bro, I feel your pain. Sometimes you get stuck having to work on a windows project and there's not a spork nearby that you can use to spork your eyeballs out with instead. Have you considered charging your clients a Windows premium for making you do that? "I need to maintain specific hardware" is a legit reason to do so. "I need new eyeballs now" is also pretty legit if you decide to go with the spork.