Fixed the profiling version ALTENTRY(). Again. The previous version
didn't set up the frame pointer before calling mcount, and then jumped to the wrong place in ENTRY() to defeat the point of the jump.
This commit is contained in:
parent
615e071ef3
commit
be16a3aba0
@ -84,15 +84,19 @@
|
||||
.globl CNAME(x); .type CNAME(x),@function; CNAME(x):
|
||||
|
||||
#ifdef PROF
|
||||
#define ENTRY(x) _ENTRY(x); 9: \
|
||||
#define ALTENTRY(x) _ENTRY(x); \
|
||||
pushl %ebp; movl %esp,%ebp; \
|
||||
call PIC_PLT(HIDENAME(mcount)); \
|
||||
popl %ebp
|
||||
|
||||
#define ALTENTRY(x) _ENTRY(x) ; call PIC_PLT(HIDENAME(mcount)) ; jmp 9f
|
||||
popl %ebp; \
|
||||
jmp 9f
|
||||
#define ENTRY(x) _ENTRY(x); \
|
||||
pushl %ebp; movl %esp,%ebp; \
|
||||
call PIC_PLT(HIDENAME(mcount)); \
|
||||
popl %ebp; \
|
||||
9:
|
||||
#else
|
||||
#define ALTENTRY(x) _ENTRY(x)
|
||||
#define ENTRY(x) _ENTRY(x)
|
||||
#define ALTENTRY(x) _ENTRY(x)
|
||||
#endif
|
||||
|
||||
#define RCSID(x) .text; .asciz x
|
||||
|
@ -84,15 +84,19 @@
|
||||
.globl CNAME(x); .type CNAME(x),@function; CNAME(x):
|
||||
|
||||
#ifdef PROF
|
||||
#define ENTRY(x) _ENTRY(x); 9: \
|
||||
#define ALTENTRY(x) _ENTRY(x); \
|
||||
pushl %ebp; movl %esp,%ebp; \
|
||||
call PIC_PLT(HIDENAME(mcount)); \
|
||||
popl %ebp
|
||||
|
||||
#define ALTENTRY(x) _ENTRY(x) ; call PIC_PLT(HIDENAME(mcount)) ; jmp 9f
|
||||
popl %ebp; \
|
||||
jmp 9f
|
||||
#define ENTRY(x) _ENTRY(x); \
|
||||
pushl %ebp; movl %esp,%ebp; \
|
||||
call PIC_PLT(HIDENAME(mcount)); \
|
||||
popl %ebp; \
|
||||
9:
|
||||
#else
|
||||
#define ALTENTRY(x) _ENTRY(x)
|
||||
#define ENTRY(x) _ENTRY(x)
|
||||
#define ALTENTRY(x) _ENTRY(x)
|
||||
#endif
|
||||
|
||||
#define RCSID(x) .text; .asciz x
|
||||
|
Loading…
Reference in New Issue
Block a user