microsoft / microsoft/PTVS

Python 3.12 support for profiler

Open
#7,787 1 comment 1 reaction 1 assignee View on GitHub

@AdamYoblick is already working on this.

Since Dec 11, 2023.

needs repro
Dominant language
C#
Stars
2.6k
Forks
680
Avg merge
39m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.