PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

Python 3.12 support for profiler

Open AdamYoblick opened this issue 1 year ago • 1 comments

This is the largest task in the 3.12 support epic.

It's much trickier because the cpython team changed lots of the python internals between 3.9 and 3.12, which will cause mismatches between our headers and the cpython ones. I've reached out to the VS team to see what the status is around VS interpreting ETW events, which would be much less work that modifying our custom profiling code and manually matching cpython headers.

Steve Dower has released a python package that publishes the ETW events at https://dev.azure.com/mseng/Python/_artifacts/feed/Python/PyPI/etwtrace/overview/0.1b2.

So here are the tasks on our end:

  • [ ] Add this package as a dependency of PTVS and package it up into the vsix that gets injected into the VS installer. Make sure it's installed/enabled.
  • [ ] Verify that the ETW events are being generated when running python code through VS.
  • [ ] Work with the VS team to have VS listen to these events and hook them up to the VS profiling tool.

Note that this approach will not work for line-level profiling (code coverage). This will require a different solution. We need to see what the line-level profiling experience looks like for other languages so we know what we need to support.

AdamYoblick avatar Dec 11 '23 23:12 AdamYoblick