calls to chdirec didn't pass 'p'.
[unix-history] / usr / src / sys / kern / subr_prof.c
index 460616f..e1abc5a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)subr_prof.c 7.9 (Berkeley) %G%
+ *     @(#)subr_prof.c 7.11 (Berkeley) %G%
  */
 
 #ifdef GPROF
  */
 
 #ifdef GPROF
@@ -51,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);
@@ -80,20 +80,9 @@ 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.
  */
-asm(".text");
-asm("#the beginning of mcount()");
-asm(".data");
 mcount()
 {
        register char *selfpc;                  /* r11 => r5 */
 mcount()
 {
        register char *selfpc;                  /* r11 => r5 */
@@ -103,7 +92,6 @@ mcount()
        register long toindex;                  /* r7  => r1 */
        static int s;
 
        register long toindex;                  /* r7  => r1 */
        static int s;
 
-       asm("   .text");                /* make sure we're in text space */
        /*
         * Check that we are profiling.
         */
        /*
         * Check that we are profiling.
         */
@@ -148,10 +136,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 */
@@ -160,7 +145,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
@@ -243,7 +228,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);