diff options
author | bde <bde@FreeBSD.org> | 2004-05-23 16:23:29 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2004-05-23 16:23:29 +0000 |
commit | f11d5307d3f59bad3e976d1fd1688b3523bdd53c (patch) | |
tree | 33cae11128d0dbd1d87bbc773fd677874f6fd69c | |
parent | 9f92506d5d930d3c9e535a53d4a77c5ddb4dbd1a (diff) | |
download | FreeBSD-src-f11d5307d3f59bad3e976d1fd1688b3523bdd53c.zip FreeBSD-src-f11d5307d3f59bad3e976d1fd1688b3523bdd53c.tar.gz |
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.
-rw-r--r-- | sys/amd64/amd64/apic_vector.S | 6 | ||||
-rw-r--r-- | sys/amd64/isa/atpic_vector.S | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/amd64/amd64/apic_vector.S b/sys/amd64/amd64/apic_vector.S index 55e2c28..3adb3cc 100644 --- a/sys/amd64/amd64/apic_vector.S +++ b/sys/amd64/amd64/apic_vector.S @@ -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 diff --git a/sys/amd64/isa/atpic_vector.S b/sys/amd64/isa/atpic_vector.S index 72f3bed..045b864 100644 --- a/sys/amd64/isa/atpic_vector.S +++ b/sys/amd64/isa/atpic_vector.S @@ -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 ; \ |