microsoft / microsoft/CLRInstrumentationEngine
Api for getting original instruction size
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 102
- Forks
- 52
- Avg merge
- 13h 11m
- Merged PRs (30d)
- 6
Description
Instrumentation alters the original instruction graph (such as expanding all branches/switches to all forms). This can make it challenging to correlate instructions with pdb data, which requires IL offset and length.
IInstruction has GetOriginalOffset which helps, but no way of getting the original size. Some possible fixes:
- Add a
GetOriginalCodeSizeapi on MethodInfo. This can be used, along withGetOriginalOffsetto figure out the original instruction sizes. - Expose a
GetOriginalInstructionLengthon each instruction.
The current workaround is to fallback to ICorProfilerInfo.GetILFunctionBody to retrieve the original CodeSize from the method header.
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 the IInstruction.GetOriginalOffset API, MethodInfo, and the ICorProfilerInfo.GetILFunctionBody workaround described in the issue. Decide which proposed API can expose the original code size or instruction length, then verify that it lets callers correlate transformed instructions with the original IL offset and length.
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
- Mostly clear
- Newbie friendliness
- 35/100