RFC mcount address adjustment
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest4 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | recordmcount mcount address adjustmentscripts/ | +7 | 0 replies | |
| 2/4 | x86 mcount offset calculationarch/ scripts/ scripts/ | +13 | 0 replies | |
| 3/4 | ia64 mcount offset calculationarch/ scripts/ scripts/ | +12 | 5 replies | |
| 4/4 | s390 mcount offset calculationarch/ scripts/ scripts/ | +9 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [patch 0/4] [RFC] mcount address adjustment
This series of patches aims to simplify the mcount address adjustment for ftrace. The frace code wants to know the start address of each function, not the address of the relocation against the mcount symbol which have been recorded to the __mcount_loc section. The ftrace_call_adjust function is used to calculate the start address of the function from the mcount relocation at runtime.
For x86, ia64 and s390 the adjustment is a constant offset. There is no need to do the adjustment at runtime, it can be done by recordmcount at compile time. Blackfin already does this with the mcount_adjust variable in the pearl version of recordmcount. After teaching the C version of recordmcount about mcount_adjust x86, ia64 and s390 can be converted to a nop ftrace_call_adjust function.
That leaves arm as the last remaining architecture with a non trivial ftrace_call_adjust function. There the least significant bit is removed from the address with an and operation. The comment says this is done for Thumb-2. This implies that for Thumb-1 the offset is 0 and for Thumb-2 the offset is -1, correct? If there is a way to distinguish the two targets in recordmcount at compile time we could convert arm as well. Which would allow us to remove the ftrace_call_adjust function.
Signature · 4 lines
blue skies, Martin. "Reality continues to ruin my life." - Calvin.