I’m happy to share that we’re starting a working group for OCaml Windows. This is part of a larger effort, First-class Windows, to enhance the OCaml experience on Windows. Through this effort, we aim to coordinate our collective knowledge to identify high-priority items for First-class Windows.
While the mailing list is intended to be the primary means of communication, we plan to do a sync meeting once a month, to start with. We plan to do a kick-off meeting early next week. Please fill in this poll if you’re interested to join: OCaml Windows Working Group - Online Poll - StrawPoll.
I don’t develop on Windows, but I sometimes debug performance issues on Windows unrelated to OCaml.
For that I use xperf that captures an .etl trace and Windows Performance Analyzer, which has a convenient ui called UIForETW for capturing profiling data (UIforETW – Windows Performance Made Easier | Random ASCII – tech blog of Bruce Dawson).
It has a mode where you get something similar to Flamegraphs on Linux.
Though there is also a tool called WinPR that I think is builtin and can capture some basic .etl traces too.
Another approach is to use AMD uProf (works on Intel too, with some limitations) : https://www.amd.com/en/developer/uprof.html. But if you’re running this in a virtualised environment you’ll likely run into problems with performance counters not being available.
If you have an Intel CPU there is also Intel VTune (although you’ll have even more problems getting this to run virtualized, I was only able to patch Xen to make it run on a very old CPU. Should work natively).
I don’t know whether any of these work with OCaml (I don’t have an OCaml windows application to profile), but I think some basic information to find out would be:
do stack traces work with OCaml compiled binaries with these tools? (probably different answers for OCaml 4 and OCaml 5, and whether you got FP enabled or not)
if not you might still be able to get stack traces using LBR (though limited in depth)
are the tools able to show you source code line number information, or do you only get to see the disassembly? (other languages would have a .PDB)
That’s perfect thanks @edwin. There is lots there for me to look into, if anyone wants to collaborate on getting together a document of what works or doesn’t please get in touch.