compiling profiling broken

Kip Macy kmacy at fsmware.com
Sat Jul 19 17:52:49 PDT 2003


Here is the (trivial) diff:
Index: i386/include/asmacros.h
===================================================================
RCS file: /home/kmacy/dcvs/src/sys/i386/include/asmacros.h,v
retrieving revision 1.4
diff -r1.4 asmacros.h
117,118c117,118
< #define FAKE_MCOUNT(caller)   pushl caller ; call _mcount ; popl %ecx
< #define MCOUNT                        call _mcount
---
> #define FAKE_MCOUNT(caller)   pushl caller ; call __mcount ; popl %ecx
> #define MCOUNT                        call __mcount
Index: i386/include/profile.h
===================================================================
RCS file: /home/kmacy/dcvs/src/sys/i386/include/profile.h,v
retrieving revision 1.2
diff -r1.2 profile.h
73c73
< #define       MCOUNT_ENTER(s) { s = read_eflags(); disable_intr(); }
---
> #define       MCOUNT_ENTER(s) { s = read_eflags(); cpu_disable_intr(); }


On Sat, 19 Jul 2003, Matthew Dillon wrote:

>     If someone would like a go at fixing this please do !  Else I'll tackle
>     it in a week or two.  p.s. there might be other issues with profiling
>     due to me not being too careful in my use of 'ret' in the assembly
>     ('ret' is overridden in the profiling code to do a lot more then just
>     'ret').
> 
>     I agree that profiling would be nice.  I'm not sure how relevant it will
>     be with the MP lock in place, but it should still tell us something.
> 
> 					-Matt
> 					Matthew Dillon 
> 					<dillon at xxxxxxxxxxxxx>
> 					-Matt
> 
> :
> :Don't worry 4.6.2, and 4.8 don't work. I guess profiling isn't 
> :interesting to many people nonetheless it would be nice if it worked:
> :mcount.o: In function `mcount':
> :mcount.o(.text+0x21): undefined reference to `disable_intr'
> :bioscall.o: In function `bios32':
> :bioscall.o(.text+0x1): undefined reference to `_mcount'
> :bioscall.o: In function `bios16_call':
> :bioscall.o(.text+0x71): undefined reference to `_mcount'
> :exception.o: In function `Xfpu':
> :exception.o(.text+0x15c): undefined reference to `_mcount'
> :exception.o: In function `alltraps_with_regs_pushed':
> :exception.o(.text+0x1c8): undefined reference to `_mcount'
> :exception.o: In function `calltrap':
> :exception.o(.text+0x1d4): undefined reference to `_mcount'
> :exception.o(.text+0x23c): more undefined references to `_mcount' follow
> :swtch.o: In function `tosw1a':
> :swtch.o(.text+0x1d6): undefined reference to `sw1a'
> :*** Error code 1
> :
> 






More information about the Bugs mailing list