projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
do not panic after modified data found on the freelist
[unix-history]
/
usr
/
src
/
sys
/
kern
/
subr_prof.c
diff --git
a/usr/src/sys/kern/subr_prof.c
b/usr/src/sys/kern/subr_prof.c
index
cf6b88c
..
eed20b5
100644
(file)
--- a/
usr/src/sys/kern/subr_prof.c
+++ b/
usr/src/sys/kern/subr_prof.c
@@
-4,7
+4,7
@@
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)subr_prof.c 7.
8
(Berkeley) %G%
+ * @(#)subr_prof.c 7.
10
(Berkeley) %G%
*/
#ifdef GPROF
*/
#ifdef GPROF
@@
-20,15
+20,7
@@
int profiling = 3;
u_short *froms;
struct tostruct *tos = 0;
long tolimit = 0;
u_short *froms;
struct tostruct *tos = 0;
long tolimit = 0;
-#if defined(vax)
-char *s_lowpc = (char *)0x80000000;
-#endif
-#if defined(tahoe)
-char *s_lowpc = (char *)0xc0000000;
-#endif
-#if defined(hp300)
-char *s_lowpc = (char *)0x00000000;
-#endif
+char *s_lowpc = (char *)KERNBASE;
extern char etext;
char *s_highpc = &etext;
u_long s_textsize = 0;
extern char etext;
char *s_highpc = &etext;
u_long s_textsize = 0;
@@
-59,7
+51,7
@@
kmstartup()
}
bzero(sbuf, ssiz);
fromssize = s_textsize / HASHFRACTION;
}
bzero(sbuf, ssiz);
fromssize = s_textsize / HASHFRACTION;
- froms = (u_short *)malloc(fromssize, M_GPROF, M_
WAITOK
);
+ froms = (u_short *)malloc(fromssize, M_GPROF, M_
NOWAIT
);
if (froms == 0) {
printf("No space for monitor buffer(s)\n");
free(sbuf, M_GPROF);
if (froms == 0) {
printf("No space for monitor buffer(s)\n");
free(sbuf, M_GPROF);
@@
-88,14
+80,6
@@
kmstartup()
kcount = (u_short *)(((int)sbuf) + sizeof (struct phdr));
}
kcount = (u_short *)(((int)sbuf) + sizeof (struct phdr));
}
-/*
- * Special, non-profiled versions
- */
-#if defined(hp300) && !defined(__GNUC__)
-#define splhigh _splhigh
-#define splx _splx
-#endif
-
/*
* This routine is massaged so that it may be jsb'ed to on vax.
*/
/*
* This routine is massaged so that it may be jsb'ed to on vax.
*/
@@
-156,10
+140,7
@@
mcount()
asm(" movl -8(r11),r11"); /* frompcindex = 1 callf frame back */
#endif
#if defined(hp300)
asm(" movl -8(r11),r11"); /* frompcindex = 1 callf frame back */
#endif
#if defined(hp300)
- asm(" .text"); /* make sure we're in text space */
- asm(" movl a6@(4),a5"); /* selfpc = pc pushed by mcount jsr */
- asm(" movl a6@(8),a4"); /* frompcindex = pc pushed by jsr into
- self, stack frame not yet built */
+ Fix Me!!
#endif
#endif /* not __GNUC__ */
#endif /* not lint */
#endif
#endif /* not __GNUC__ */
#endif /* not lint */
@@
-168,7
+149,7
@@
mcount()
* this requires that splhigh() and splx() below
* do NOT call mcount!
*/
* this requires that splhigh() and splx() below
* do NOT call mcount!
*/
-#if defined(hp300)
&& defined(__GNUC__)
+#if defined(hp300)
asm("movw sr,%0" : "=g" (s));
asm("movw #0x2700,sr");
#else
asm("movw sr,%0" : "=g" (s));
asm("movw #0x2700,sr");
#else
@@
-251,7
+232,7
@@
mcount()
}
done:
}
done:
-#if defined(hp300)
&& defined(__GNUC__)
+#if defined(hp300)
asm("movw %0,sr" : : "g" (s));
#else
splx(s);
asm("movw %0,sr" : : "g" (s));
#else
splx(s);