mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-08 12:18:31 +00:00
Get --ftrace working on aarch64
This change implements a new approach to function call logging, that's based on the GCC flag: -fpatchable-function-entry. Read the commentary in build/config.mk to learn how it works.
This commit is contained in:
parent
5b908bc756
commit
eb40cb371d
934 changed files with 2259 additions and 1268 deletions
|
@ -23,8 +23,9 @@
|
|||
// @param edi is int to encode
|
||||
// @return rax is word-encoded byte buffer
|
||||
// @note invented on a napkin in a new jersey diner
|
||||
_tpenc: .leafprologue
|
||||
.profilable
|
||||
.ftrace1
|
||||
_tpenc: .ftrace2
|
||||
.leafprologue
|
||||
mov %edi,%edi
|
||||
xor %eax,%eax
|
||||
cmp $127,%edi
|
||||
|
@ -47,20 +48,20 @@ _tpenc: .leafprologue
|
|||
.rodata
|
||||
.balign 4
|
||||
.underrun
|
||||
kTpenc: .rept 4 # MSB≤10 (0x7FF)
|
||||
.byte 1,0b11000000 # len,mark
|
||||
kTpenc: .rept 4 // MSB≤10 (0x7FF)
|
||||
.byte 1,0b11000000 // len,mark
|
||||
.endr
|
||||
.rept 5 # MSB≤15 (0xFFFF)
|
||||
.byte 2,0b11100000 # len,mark
|
||||
.rept 5 // MSB≤15 (0xFFFF)
|
||||
.byte 2,0b11100000 // len,mark
|
||||
.endr
|
||||
.rept 5 # MSB≤20 (0x1FFFFF)
|
||||
.byte 3,0b11110000 # len,mark
|
||||
.rept 5 // MSB≤20 (0x1FFFFF)
|
||||
.byte 3,0b11110000 // len,mark
|
||||
.endr
|
||||
.rept 5 # MSB≤25 (0x3FFFFFF)
|
||||
.byte 4,0b11111000 # len,mark
|
||||
.rept 5 // MSB≤25 (0x3FFFFFF)
|
||||
.byte 4,0b11111000 // len,mark
|
||||
.endr
|
||||
.rept 6 # MSB≤31 (0xffffffff)
|
||||
.byte 5,0b11111100 # len,mark
|
||||
.rept 6 // MSB≤31 (0xffffffff)
|
||||
.byte 5,0b11111100 // len,mark
|
||||
.endr
|
||||
.zero 2
|
||||
.endobj kTpenc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue