4
;; On a sun in sun0S 3 or 4.0
5
;; make a modified copy of /lib/gcrt0.o called gcrt0-mod.o
6
;; then (cd unixport ; make "EXTRAS=../lsp/gcrt0-mod.o")
7
;; after compiling some .o files with
8
;; (cd o ; make "CFLAGS = -I../h -pg -g -c")
9
;; (invoke gprof-setup)
10
;; and (monitor #x800 3000000)
11
;; (monitor 0 0) to start and stop respectively
12
;; on suns the buffersize = (highpc- lowpc)/2 +6
15
(clines "#include \"gprof.hc\"")
17
(defun gprof-setup (&optional (n 800000) (m 1000000))
18
(mymonstartup #x800 n)
19
(set-up-monitor-array m)
20
(format t" ;; and (monitor #x800 3000000)
21
;; (monitor 0 0) to start and stop respectively
25
(defentry mymonstartup (int int) (int "mymonstartup"))
26
;(defentry monitor1 (int int object) (int "mymonitor"))
27
(defentry monitor2 (int int int int) (int "mymonitor"))
29
(defentry write_outsyms () (int "write_outsyms"))
31
(defvar *monitor-array* nil)
33
(defun set-up-monitor-array (&optional (n 1000000))
34
(unless *monitor-array* (setf *monitor-array*
35
(make-array n :element-type 'string-char
37
;(mymonstartup 0 2000000)
41
(defun monitor (low high)
42
(monitor1 low high *monitor-array*))
44
(defun write-syms.out ()