OCaml Windows Working Group

Hi all,

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.

We’ve started a mailing list to exchange ideas and would greatly appreciate inputs. You can sign up at – https://groups.google.com/u/0/g/ocaml-windows-wg

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.

Happy camling :camel:

12 Likes

The kick-off meeting is scheduled on the 10th of June at 11 AM Paris time. Please fine the details below:

Zoom Meeting
https://us06web.zoom.us/j/86248379796?pwd=bX8Wl3piVPcXsrOzsoyuITPaGfaExk.1

Meeting ID: 862 4837 9796
Passcode: 635907

Link to the calendar: OCaml Windows WG

1 Like

Thanks to everyone who joined the meeting! Please find the notes here: Notes – OCaml Windows WG - Google Docs.

The meeting time this time wasn’t US time-zone friendly. We’ll try to find a time that works for more people next time.

1 Like

The next Windows WG meeting is scheduled for 18th July at 2.30 PM CEST (18.30 IST). Look forward to seeing some of you there!

Join Zoom Meeting

Meeting ID: 823 3490 3099
Passcode: 358422

1 Like

Awesome, I’ll do my best to turn up.

My interests in Windows are mainly focused on:

  1. What the debugging experience could look like and what support we need to add to OCaml to get proper PDB debugging working?
  2. How to profile (CPU and memory) OCaml on Windows? What tools do you use with other languages and can we reuse those with OCaml?

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.

There are various tools on top of it, e.g. ETWAnalyzer, and there is Threads view/Concurrency Visualiser in Visual Studio, see here for an example of how to use it

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).

Finally there is also GitHub - wolfpld/tracy: Frame profiler and there is some OCaml support for it, don’t know whether it works on Windows.

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)
2 Likes

Please update the discord link (invalid) in the notes.

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.