Add unmap events to trace?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 662
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 2
Description
Traces contain explicit records for all mappings, but currently tools that want to extract unmap events from the trace have to study rr's inner workings to determine exactly what is unmapped and when. For example in Task::clone we unmap some tasks' syscall buffers and scratch buffers after a fork, and these decisions are not recorded in the trace. It would be much cleaner for tools other than rr itself if we recorded these unmap events in the trace.
However, it would be good if the ecosystem around rr traces can consume any trace in the rr 5.0+ format. So maybe we should just document the unmap rules carefully instead, and if we ever change them, enhance the trace to record unmaps and add a flag to say to use those recorded events instead of the default rules. This approach is more complex for consumers though.
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 by reading Task::clone and the existing trace mapping records to understand how syscall and scratch buffers are unmapped after a fork. Compare the two proposed approaches: documenting stable unmap rules or recording unmap events with a trace-format flag. Done means the compatibility impact and implementation scope are decided clearly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100