Adjusted FAKE_MCOUNT()s for amd64. This is needed for both ordinary
and high resolution profiling of interrupt handlers. The adjustments are routine once the magic stack offset 13*4 is decoded to be TF_RIP (there were originally more types of stack frames so using TF_EIP for one of them wouldn't have been much simpler). Removed garbage comments attached to some of the FAKE_MCOUNT()s.
This commit is contained in:
parent
cf5a37b816
commit
5423714950
@ -100,7 +100,7 @@
|
||||
SUPERALIGN_TEXT ; \
|
||||
IDTVEC(vec_name) ; \
|
||||
PUSH_FRAME ; \
|
||||
FAKE_MCOUNT(13*4(%esp)) ; /* XXX avoid double count */ \
|
||||
FAKE_MCOUNT(TF_RIP(%rsp)) ; \
|
||||
movq lapic, %rdx ; /* pointer to local APIC */ \
|
||||
movl LA_ISR + 16 * (index)(%rdx), %eax ; /* load ISR */ \
|
||||
bsrl %eax, %eax ; /* index of highset set bit in ISR */ \
|
||||
@ -234,7 +234,7 @@ IDTVEC(statclock)
|
||||
movq lapic, %rdx
|
||||
movl $0, LA_EOI(%rdx) /* End Of Interrupt to APIC */
|
||||
|
||||
FAKE_MCOUNT(13*4(%esp))
|
||||
FAKE_MCOUNT(TF_RIP(%rsp))
|
||||
|
||||
call forwarded_statclock
|
||||
MEXITCOUNT
|
||||
@ -256,7 +256,7 @@ IDTVEC(cpuast)
|
||||
movq lapic, %rdx
|
||||
movl $0, LA_EOI(%rdx) /* End Of Interrupt to APIC */
|
||||
|
||||
FAKE_MCOUNT(13*4(%esp))
|
||||
FAKE_MCOUNT(TF_RIP(%rsp))
|
||||
|
||||
MEXITCOUNT
|
||||
jmp doreti
|
||||
|
@ -66,7 +66,7 @@ IDTVEC(vec_name) ; \
|
||||
movq %r13,TF_R13(%rsp) ; \
|
||||
movq %r14,TF_R14(%rsp) ; \
|
||||
movq %r15,TF_R15(%rsp) ; \
|
||||
FAKE_MCOUNT(13*4(%esp)) ; /* XXX late to avoid double count */ \
|
||||
FAKE_MCOUNT(TF_RIP(%rsp)) ; \
|
||||
movq $irq_num, %rdi; /* pass the IRQ */ \
|
||||
call atpic_handle_intr ; \
|
||||
MEXITCOUNT ; \
|
||||
|
Loading…
Reference in New Issue
Block a user