Annotation of coherent/b/lib/libc/crt/i386/_prof.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Called from the run-time start-off to enable profiling and to
                      3:  * write out the final profiling information.
                      4:  */
                      5: #include <stdio.h>
                      6: #include <sys/types.h>
                      7: 
                      8: 
                      9: #define        STDERR  2
                     10: 
                     11: 
                     12: _profon()
                     13: {
                     14: #ifndef        Z8001
                     15:        register unsigned       bufl;
                     16:        register short          *buf;
                     17:        extern                  __end_text();
                     18:        static char             emsg[]  = "No room for profil buffer\n";
                     19: 
                     20:        bufl = (unsigned)__end_text / 2;
                     21:        buf = (short *)sbrk(bufl * sizeof (short));
                     22:        if (buf == NULL) {
                     23:                write(STDERR, emsg, sizeof emsg);
                     24:                abort();
                     25:        }
                     26:        monitor((caddr_t)1, (caddr_t)__end_text, buf, bufl);
                     27: #else
                     28:        monitor((caddr_t)1);            /* dummy call to start things off */
                     29: #endif
                     30: }
                     31: 
                     32: 
                     33: _profoff()
                     34: {
                     35:        monitor(NULL);
                     36: }
                     37: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.