Sampling binary profiles do not record the profiling mode
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
The sampling binary header does not record --mode. Replay and differential flamegraphs therefore cannot describe or validate how the baseline was collected.
python -m profiling.sampling run --mode cpu --binary -o baseline.bin demo.py
python -m profiling.sampling replay --flamegraph -o replay.html baseline.bin
python -m profiling.sampling run --mode wall --diff-flamegraph baseline.bin -o diff.html demo.py
The replay has no CPU-mode metadata, and the differential run silently compares a CPU baseline with a wall-time profile. These measurements are not comparable.
CPython versions tested on:
3.16
Operating systems tested on:
Linux
Linked PRs
- gh-154105
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the profiling.sampling run and replay commands in the report, using the CPU and wall-time examples to reproduce the missing metadata and mismatched comparison. Read the binary profile header handling and the replay and differential flamegraph entry points. Done means the profiling mode is retained in the binary and available for replay or differential validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100