amiga now uses PROF and uses m68k/asm.h in locore.s

This commit is contained in:
chopps 1994-02-22 02:05:25 +00:00
parent c680a85d1d
commit ad9cc8b5da
2 changed files with 11 additions and 22 deletions

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: clock.c 1.18 91/01/21$ * from: Utah $Hdr: clock.c 1.18 91/01/21$
* *
* @(#)clock.c 7.6 (Berkeley) 5/7/91 * @(#)clock.c 7.6 (Berkeley) 5/7/91
* $Id: clock.c,v 1.6 1994/02/13 21:13:16 chopps Exp $ * $Id: clock.c,v 1.7 1994/02/22 02:05:25 chopps Exp $
*/ */
#include <sys/param.h> #include <sys/param.h>
@ -49,8 +49,8 @@
#include <machine/psl.h> #include <machine/psl.h>
#include <machine/cpu.h> #include <machine/cpu.h>
#if defined(GPROF) && defined(PROFTIMER) #if defined(PROF) && defined(PROFTIMER)
#include <sys/gprof.h> #include <sys/PROF.h>
#endif #endif
/* the clocks run at NTSC: 715.909kHz or PAL: 709.379kHz. /* the clocks run at NTSC: 715.909kHz or PAL: 709.379kHz.
@ -206,7 +206,7 @@ clockopen(dev, flags)
dev_t dev; dev_t dev;
{ {
#ifdef PROFTIMER #ifdef PROFTIMER
#ifdef GPROF #ifdef PROF
/* /*
* Kernel profiling enabled, give up. * Kernel profiling enabled, give up.
*/ */
@ -426,7 +426,7 @@ stopprofclock()
ciab.crb = ciab.crb & 0xc0; ciab.crb = ciab.crb & 0xc0;
} }
#ifdef GPROF #ifdef PROF
/* /*
* profclock() is expanded in line in lev6intr() unless profiling kernel. * profclock() is expanded in line in lev6intr() unless profiling kernel.
* Assumes it is called with clock interrupts blocked. * Assumes it is called with clock interrupts blocked.

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: locore.s 1.58 91/04/22$ * from: Utah $Hdr: locore.s 1.58 91/04/22$
* *
* @(#)locore.s 7.11 (Berkeley) 5/9/91 * @(#)locore.s 7.11 (Berkeley) 5/9/91
* $Id: locore.s,v 1.10 1994/02/13 21:13:23 chopps Exp $ * $Id: locore.s,v 1.11 1994/02/22 02:05:27 chopps Exp $
* *
* Original (hp300) Author: unknown, maybe Mike Hibler? * Original (hp300) Author: unknown, maybe Mike Hibler?
* Amiga author: Markus Wild * Amiga author: Markus Wild
@ -616,7 +616,7 @@ Lstackok:
btst #1,d0 | timerB interrupt? btst #1,d0 | timerB interrupt?
jeq LtimerA | no, must be timerA jeq LtimerA | no, must be timerA
lea sp@(16),a1 | get pointer to PS lea sp@(16),a1 | get pointer to PS
#ifdef GPROF #ifdef PROF
.globl _profclock .globl _profclock
movl d0,sp@- | save status so jsr will not clobber movl d0,sp@- | save status so jsr will not clobber
movl a1@,sp@- | push padded PS movl a1@,sp@- | push padded PS
@ -650,7 +650,7 @@ LtimerA:
addql #1,_intrcnt+28 | add another system clock interrupt addql #1,_intrcnt+28 | add another system clock interrupt
#ifdef PROFTIMER #ifdef PROFTIMER
Ltimend: Ltimend:
#ifdef GPROF #ifdef PROF
.globl _profiling, _startprofclock .globl _profiling, _startprofclock
tstl _profiling | kernel profiling desired? tstl _profiling | kernel profiling desired?
jne Ltimdone | no, all done jne Ltimdone | no, all done
@ -1007,18 +1007,7 @@ _szicode:
/* /*
* Primitives * Primitives
*/ */
#include <m68k/asm.h>
#ifdef GPROF
#define ENTRY(name) \
.globl _/**/name; _/**/name: link a6,#0; jbsr mcount; unlk a6
#define ALTENTRY(name, rname) \
ENTRY(name); jra rname+12
#else
#define ENTRY(name) \
.globl _/**/name; _/**/name:
#define ALTENTRY(name, rname) \
.globl _/**/name; _/**/name:
#endif
/* /*
* update profiling information for the user * update profiling information for the user
@ -1337,7 +1326,7 @@ Lswnochg:
#endif #endif
bclr #0,_profon | clear user profiling bit, was set? bclr #0,_profon | clear user profiling bit, was set?
jeq Lskipoff | no, clock off or doing kernel only jeq Lskipoff | no, clock off or doing kernel only
#ifdef GPROF #ifdef PROF
tstb _profon | kernel profiling also enabled? tstb _profon | kernel profiling also enabled?
jlt Lskipoff | yes, nothing more to do jlt Lskipoff | yes, nothing more to do
#endif #endif
@ -1398,7 +1387,7 @@ Lres5:
tstl a1@(U_PROFSCALE) | process being profiled? tstl a1@(U_PROFSCALE) | process being profiled?
jeq Lskipon | no, do nothing jeq Lskipon | no, do nothing
orb #1,_profon | turn on user profiling bit orb #1,_profon | turn on user profiling bit
#ifdef GPROF #ifdef PROF
jlt Lskipon | already profiling kernel, all done jlt Lskipon | already profiling kernel, all done
#endif #endif
CIABADDR(a0) CIABADDR(a0)