Swift Windows working group

Welcome!

Just to make sure I read that correct - you are interested in ETW profiling of the toolchain itself?

I think I can reasonably say the answer is “yes, there are performance gains to be had”. The problem is that I cannot say how to get those gains :joy: The ETW profiling is definitely something that would be needed. I don’t know if we really need to get into the actual tracepoints themselves, using WPA and the rest of WPT should be a good start IMO.

Well, your timing is rather impressive then. The SxS support is something that is currently in progress. There is a separate thread on the upcoming Windows SDK changes that I would suggest that you follow up on. The new experimental SDK enables the builds with SxS manifests embedded in the runtime. The work that currently remains is to:

  1. finish packaging the runtime
  2. ensure that the experimental SDK builds are not (unintentionally) breaking ABI - basically is the build correct
  3. ensure that there is no real performance regression being introduced
  4. ensure that the experimental SDK is complete and works for real world usage
  5. switch over to the experimental SDK
  6. drop the legacy SDK

Getting the toolchain to build on Windows is a good first step. I think that the next steps would be to address problems in the build. Right now, the only option for profiling is really WPT. In order to use WPA we would need good CodeView/PDB generation. Therein lies the difficulty: we have an increasing amount of Swift code in the toolchain, and the CodeView generation for Swift is not very good. As such, we would need to improve the quality of debug information that we emit so that we can get meaningful ETW traces from WPA. Fortunately, we use MSVC for the C/C++ code in the compiler so we can get good traces for that portion of the compiler.

I have been thinking a bit about this over the past few weeks and am trying to see if I can do something that would help facilitate this.