~ubuntu-branches/ubuntu/quantal/gclcvs/quantal

« back to all changes in this revision

Viewing changes to lsp/gprof1.lisp

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-06-24 15:13:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040624151346-xh0xaaktyyp7aorc
Tags: 2.7.0-26
C_GC_OFFSET is 2 on m68k-linux

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(in-package 'si)
 
2
 
 
3
;;  (load "gprof.o")
 
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
 
13
 
 
14
 
 
15
(clines "#include \"gprof.hc\"")
 
16
 
 
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
 
22
        ")
 
23
   nil)
 
24
 
 
25
(defentry mymonstartup (int int) (int "mymonstartup"))
 
26
;(defentry monitor1 (int int object) (int "mymonitor"))
 
27
(defentry monitor2 (int int int int) (int "mymonitor"))
 
28
 
 
29
(defentry write_outsyms () (int "write_outsyms"))
 
30
 
 
31
(defvar *monitor-array* nil)
 
32
 
 
33
(defun set-up-monitor-array (&optional (n 1000000))
 
34
  (unless *monitor-array* (setf *monitor-array*
 
35
                                (make-array n :element-type 'string-char
 
36
                                            :static t))
 
37
          ;(mymonstartup 0 2000000)
 
38
          nil
 
39
          ))
 
40
 
 
41
(defun monitor (low high)
 
42
  (monitor1 low high *monitor-array*))
 
43
 
 
44
(defun write-syms.out ()
 
45
  (set-up-combined)
 
46
  (write_outsyms))
 
47
 
 
48
 
 
49
 
 
50
 
 
51
 
 
52
 
 
53