diff options
author | Kris Kennaway <kris@FreeBSD.org> | 2003-10-19 09:06:38 +0000 |
---|---|---|
committer | Kris Kennaway <kris@FreeBSD.org> | 2003-10-19 09:06:38 +0000 |
commit | d3e617d3b42f5095b5f6e5afb034eda64a7abb27 (patch) | |
tree | 670174c099581f11a89ab065501c2c9c14c9ab0c /devel | |
parent | 14c347cefab93c55d47063d544284f7a93a21b4d (diff) | |
download | ports-d3e617d3b42f5095b5f6e5afb034eda64a7abb27.tar.gz ports-d3e617d3b42f5095b5f6e5afb034eda64a7abb27.zip |
Notes
Diffstat (limited to 'devel')
-rw-r--r-- | devel/mprof/files/patch-01 | 233 | ||||
-rw-r--r-- | devel/mprof/files/patch-Makefile.i386 | 152 | ||||
-rw-r--r-- | devel/mprof/files/patch-mprof.h | 51 | ||||
-rw-r--r-- | devel/mprof/files/patch-mprof_mon.c | 29 |
4 files changed, 232 insertions, 233 deletions
diff --git a/devel/mprof/files/patch-01 b/devel/mprof/files/patch-01 deleted file mode 100644 index 56920fc57cab..000000000000 --- a/devel/mprof/files/patch-01 +++ /dev/null @@ -1,233 +0,0 @@ -*** ../m/mprof_mon.c Tue Apr 20 13:36:09 1993 ---- mprof_mon.c Fri Sep 17 17:09:01 1993 -*************** -*** 5,10 **** ---- 5,11 ---- - */ - - #include <stdio.h> -+ #include <unistd.h> - #include <sys/file.h> - #include "mprof.h" - -*************** -*** 411,417 **** - #ifdef sun - on_exit(mprof_exit, NULL); - #endif -! #ifdef mips - atexit(mprof_exit); - #endif - ---- 412,418 ---- - #ifdef sun - on_exit(mprof_exit, NULL); - #endif -! #if defined(mips) || defined(__FreeBSD__) - atexit(mprof_exit); - #endif - -*** ../m/mprof.h Tue Apr 20 13:36:07 1993 ---- mprof.h Fri Sep 17 16:53:52 1993 -*************** -*** 109,115 **** - - extern char *strdup(); - -! #if (defined(vax) || (defined(sun) && !defined(sun4))) - #define get_current_fp(first_local) ((unsigned)&(first_local) + 4) - #endif - ---- 109,115 ---- - - extern char *strdup(); - -! #if (defined(vax) || (defined(sun) && !defined(sun4))) || defined(__FreeBSD__) - #define get_current_fp(first_local) ((unsigned)&(first_local) + 4) - #endif - -*************** -*** 120,126 **** - #define ret_addr_from_fp(fp) (unsigned)(((struct frame *)(fp))->fr_savpc) - #endif - -! - /* for ultrix 0x38, 4.3 bsd 0x3d, other? - */ - ---- 120,130 ---- - #define ret_addr_from_fp(fp) (unsigned)(((struct frame *)(fp))->fr_savpc) - #endif - -! #if defined(__FreeBSD__) -! #define prev_fp_from_fp(fp) *((unsigned *) fp) -! #define ret_addr_from_fp(fp) *((unsigned *) (fp+4)) -! #endif -! - /* for ultrix 0x38, 4.3 bsd 0x3d, other? - */ - -*************** -*** 134,137 **** ---- 138,145 ---- - - #ifdef mips - #define CRT0_ADDRESS 0x0 /* to be filled in later */ -+ #endif -+ -+ #ifdef __FreeBSD__ -+ #define CRT0_ADDRESS 0x10d3 - #endif -*** /dev/null Tue Nov 22 00:34:22 1994 ---- Makefile.i386 Tue Nov 22 01:03:41 1994 -*************** -*** 0 **** ---- 1,148 ---- -+ # %M% %I% %G% %U% -+ # Copyright (c) 1987, Benjamin G. Zorn -+ # -+ # Makefile for MPROF data generation -+ # -+ -+ CC = cc -+ -+ # mips CFLAGS = -I. -g -DDEBUG -+ # sun4 CFLAGS = -I. -g -Dsun4 -+ # sun3,vax, i386 CFLAGS = -I. -g -+ -+ # sun4 ASFLAGS = -P -Dsun4 -+ # sun3,vax,mips, i386 ASFLAGS = -+ -+ CFLAGS = -I. -g -static -+ ASFLAGS = -+ BIN = . -+ MPLIB = $(BIN)/libc_mp.a -+ LINTFLAGS = -bhx -+ -+ # sun4,mips ASM_SRC = md.s -+ # sun4,mips ASM_OBJ = md.o -+ # vax,sun3 ASM_SRC = -+ # vax,sun3 ASM_OBJ = -+ -+ ASM_SRC = -+ ASM_OBJ = -+ -+ MPROF_MON_SRCS = leak.c malloc.c mpattach.c mprof_mon.c mpstruct.c $(ASM_SRC) -+ MPROF_MON_OBJS = leak.o malloc.o mpattach.o mprof_mon.o mpstruct.o $(ASM_OBJ) -+ -+ MPROF_SRCS = mprof.c mpstruct.c mpgraph.c -+ MPROF_OBJS = mprof.o mpstruct.o mpgraph.o -+ -+ DOC_SRC = mprof.1 -+ DOC_OBJS = mprof.man -+ -+ DISTNAME = mprof-3.0 -+ -+ TEST_SRCS = test1.c test2.c -+ TEST_OBJS = test1.o test2.o -+ -+ all: mprof $(MPROF_MON_OBJS) $(DOC_OBJS) $(MPLIB) -+ -+ mips $(MPLIB): $(MPROF_MON_OBJS) -+ ar cr libc_mp.a $(MPROF_MON_OBJS) -+ ranlib libc_mp.a -+ -+ # sun3, sun4 LIB_REPLACE = memalign.o -+ # vax LIB_REPLACE = exit.o -+ # mips LIB_REPLACE = -+ -+ LIB_REPLACE = exit.o -+ -+ #$(MPLIB): $(MPROF_MON_OBJS) -+ # cp /lib/libc.a libc_mp.a -+ # ar d libc_mp.a malloc.o valloc.o $(LIB_REPLACE) -+ # ar r libc_mp.a $(MPROF_MON_OBJS) -+ # ranlib libc_mp.a -+ -+ test: $(TEST_OBJS) test1-demo test2-demo -+ -+ mprof-mon-lint: -+ lint $(LINTFLAGS) $(MPROF_MON_SRCS) > mprof.lint -+ -+ mprof-lint: -+ lint $(LINTFLAGS) $(MPROF_SRCS) > mprof.lint -+ -+ clean: -+ rm -f *.o mprof.lint mprof-mon.lint \ -+ $(DOC_OBJS) \ -+ $(TEST_OBJS) \ -+ test1 test1.data test1.mprof \ -+ test2 test2.data test2.mprof \ -+ libc_mp.a mprof mprof.data -+ -+ leak.o: leak.c -+ mprof_mon.o: mprof_mon.c -+ mpstruct.o: mpstruct.c -+ mpgraph.o: mpgraph.c -+ mprof.o: mprof.c -+ md.o: md.s -+ $(AS) $(ASFLAGS) -o md.o md.s -+ -+ malloc.o: malloc.c -+ $(CC) $(CFLAGS) -Dmalloc=__malloc__ -Dfree=__free__ -Drealloc=__realloc__ malloc.c -c -+ -+ mprof: $(MPROF_OBJS) -+ $(CC) $(CFLAGS) -o mprof $(MPROF_OBJS) -+ -+ mprof.man: mprof.1 -+ nroff -man mprof.1 > mprof.man -+ -+ dist: MANIFEST -+ tar cvf $(DISTNAME).tar `cat MANIFEST` -+ compress $(DISTNAME).tar -+ -+ # -+ # Examples to test if MPROF is installed correctly -+ # -+ -+ # A very simple test (tests calloc and valloc) -+ -+ test1-demo: test1.data -+ $(BIN)/mprof -normal test1 test1.data > test1.mprof -+ -+ test1.mprof: test1.data -+ $(BIN)/mprof -normal test1 test1.data > test1.mprof -+ -+ test1.data: test1 -+ test1 -+ cp mprof.data test1.data -+ -+ test1: test1.o $(MPLIB) -+ $(CC) $(CFLAGS) -o test1 test1.o $(MPLIB) -+ -+ test1.o: test1.c -+ -+ -+ # test2 program (example from paper) -+ -+ test2-demo: test2.data -+ $(BIN)/mprof -normal test2 test2.data > test2.mprof -+ -+ test2.mprof: test2.data -+ $(BIN)/mprof -normal test2 test2.data > test2.mprof -+ -+ test2.data: test2 -+ test2 -+ cp mprof.data test2.data -+ -+ test2: test2.o $(MPLIB) -+ $(CC) $(CFLAGS) -o test2 test2.o $(MPLIB) -+ -+ test2.o: test2.c -+ -+ -+ ### -+ leak.o: /usr/include/stdio.h mprof.h /usr/include/sys/types.h -+ malloc.o: /usr/include/sys/types.h /usr/include/stdio.h -+ mprof.o: /usr/include/stdio.h /usr/include/sys/file.h /usr/include/ctype.h \ -+ /usr/include/a.out.h /usr/include/sys/exec.h /usr/include/stab.h \ -+ mprof.h /usr/include/sys/types.h -+ mprof_mon.o: /usr/include/stdio.h /usr/include/sys/file.h mprof.h \ -+ /usr/include/sys/types.h -+ mpstruct.o: /usr/include/stdio.h mprof.h /usr/include/sys/types.h -+ mpgraph.o: /usr/include/stdio.h mprof.h /usr/include/sys/types.h diff --git a/devel/mprof/files/patch-Makefile.i386 b/devel/mprof/files/patch-Makefile.i386 new file mode 100644 index 000000000000..12edbdd57fc9 --- /dev/null +++ b/devel/mprof/files/patch-Makefile.i386 @@ -0,0 +1,152 @@ +--- Makefile.i386.orig Sun Oct 19 02:01:03 2003 ++++ Makefile.i386 Sun Oct 19 02:01:28 2003 +@@ -0,0 +1,149 @@ ++# %M% %I% %G% %U% ++# Copyright (c) 1987, Benjamin G. Zorn ++# ++# Makefile for MPROF data generation ++# ++ ++CC ?= cc ++ ++# mips CFLAGS = -I. -g -DDEBUG ++# sun4 CFLAGS = -I. -g -Dsun4 ++# sun3,vax, i386 CFLAGS = -I. -g ++ ++# sun4 ASFLAGS = -P -Dsun4 ++# sun3,vax,mips, i386 ASFLAGS = ++ ++CFLAGS ?= -O -pipe ++CFLAGS += -I. -g -static ++ASFLAGS = ++BIN = . ++MPLIB = $(BIN)/libc_mp.a ++LINTFLAGS = -bhx ++ ++# sun4,mips ASM_SRC = md.s ++# sun4,mips ASM_OBJ = md.o ++# vax,sun3 ASM_SRC = ++# vax,sun3 ASM_OBJ = ++ ++ASM_SRC = ++ASM_OBJ = ++ ++MPROF_MON_SRCS = leak.c malloc.c mpattach.c mprof_mon.c mpstruct.c $(ASM_SRC) ++MPROF_MON_OBJS = leak.o malloc.o mpattach.o mprof_mon.o mpstruct.o $(ASM_OBJ) ++ ++MPROF_SRCS = mprof.c mpstruct.c mpgraph.c ++MPROF_OBJS = mprof.o mpstruct.o mpgraph.o ++ ++DOC_SRC = mprof.1 ++DOC_OBJS = mprof.man ++ ++DISTNAME = mprof-3.0 ++ ++TEST_SRCS = test1.c test2.c ++TEST_OBJS = test1.o test2.o ++ ++all: mprof $(MPROF_MON_OBJS) $(DOC_OBJS) $(MPLIB) ++ ++mips $(MPLIB): $(MPROF_MON_OBJS) ++ ar cr libc_mp.a $(MPROF_MON_OBJS) ++ ranlib libc_mp.a ++ ++# sun3, sun4 LIB_REPLACE = memalign.o ++# vax LIB_REPLACE = exit.o ++# mips LIB_REPLACE = ++ ++LIB_REPLACE = exit.o ++ ++#$(MPLIB): $(MPROF_MON_OBJS) ++# cp /lib/libc.a libc_mp.a ++# ar d libc_mp.a malloc.o valloc.o $(LIB_REPLACE) ++# ar r libc_mp.a $(MPROF_MON_OBJS) ++# ranlib libc_mp.a ++ ++test: $(TEST_OBJS) test1-demo test2-demo ++ ++mprof-mon-lint: ++ lint $(LINTFLAGS) $(MPROF_MON_SRCS) > mprof.lint ++ ++mprof-lint: ++ lint $(LINTFLAGS) $(MPROF_SRCS) > mprof.lint ++ ++clean: ++ rm -f *.o mprof.lint mprof-mon.lint \ ++ $(DOC_OBJS) \ ++ $(TEST_OBJS) \ ++ test1 test1.data test1.mprof \ ++ test2 test2.data test2.mprof \ ++ libc_mp.a mprof mprof.data ++ ++leak.o: leak.c ++mprof_mon.o: mprof_mon.c ++mpstruct.o: mpstruct.c ++mpgraph.o: mpgraph.c ++mprof.o: mprof.c ++md.o: md.s ++ $(AS) $(ASFLAGS) -o md.o md.s ++ ++malloc.o: malloc.c ++ $(CC) $(CFLAGS) -Dmalloc=__malloc__ -Dfree=__free__ -Drealloc=__realloc__ malloc.c -c ++ ++mprof: $(MPROF_OBJS) ++ $(CC) $(CFLAGS) -o mprof $(MPROF_OBJS) ++ ++mprof.man: mprof.1 ++ nroff -man mprof.1 > mprof.man ++ ++dist: MANIFEST ++ tar cvf $(DISTNAME).tar `cat MANIFEST` ++ compress $(DISTNAME).tar ++ ++# ++# Examples to test if MPROF is installed correctly ++# ++ ++# A very simple test (tests calloc and valloc) ++ ++test1-demo: test1.data ++ $(BIN)/mprof -normal test1 test1.data > test1.mprof ++ ++test1.mprof: test1.data ++ $(BIN)/mprof -normal test1 test1.data > test1.mprof ++ ++test1.data: test1 ++ test1 ++ cp mprof.data test1.data ++ ++test1: test1.o $(MPLIB) ++ $(CC) $(CFLAGS) -o test1 test1.o $(MPLIB) ++ ++test1.o: test1.c ++ ++ ++# test2 program (example from paper) ++ ++test2-demo: test2.data ++ $(BIN)/mprof -normal test2 test2.data > test2.mprof ++ ++test2.mprof: test2.data ++ $(BIN)/mprof -normal test2 test2.data > test2.mprof ++ ++test2.data: test2 ++ test2 ++ cp mprof.data test2.data ++ ++test2: test2.o $(MPLIB) ++ $(CC) $(CFLAGS) -o test2 test2.o $(MPLIB) ++ ++test2.o: test2.c ++ ++ ++### ++leak.o: /usr/include/stdio.h mprof.h /usr/include/sys/types.h ++malloc.o: /usr/include/sys/types.h /usr/include/stdio.h ++mprof.o: /usr/include/stdio.h /usr/include/sys/file.h /usr/include/ctype.h \ ++ /usr/include/a.out.h /usr/include/sys/exec.h /usr/include/stab.h \ ++ mprof.h /usr/include/sys/types.h ++mprof_mon.o: /usr/include/stdio.h /usr/include/sys/file.h mprof.h \ ++ /usr/include/sys/types.h ++mpstruct.o: /usr/include/stdio.h mprof.h /usr/include/sys/types.h ++mpgraph.o: /usr/include/stdio.h mprof.h /usr/include/sys/types.h diff --git a/devel/mprof/files/patch-mprof.h b/devel/mprof/files/patch-mprof.h new file mode 100644 index 000000000000..4760a941c879 --- /dev/null +++ b/devel/mprof/files/patch-mprof.h @@ -0,0 +1,51 @@ +*** ../m/mprof.h Tue Apr 20 13:36:07 1993 +--- mprof.h Fri Sep 17 16:53:52 1993 +*************** +*** 109,115 **** + + extern char *strdup(); + +! #if (defined(vax) || (defined(sun) && !defined(sun4))) + #define get_current_fp(first_local) ((unsigned)&(first_local) + 4) + #endif + +--- 109,115 ---- + + extern char *strdup(); + +! #if (defined(vax) || (defined(sun) && !defined(sun4))) || defined(__FreeBSD__) + #define get_current_fp(first_local) ((unsigned)&(first_local) + 4) + #endif + +*************** +*** 120,126 **** + #define ret_addr_from_fp(fp) (unsigned)(((struct frame *)(fp))->fr_savpc) + #endif + +! + /* for ultrix 0x38, 4.3 bsd 0x3d, other? + */ + +--- 120,130 ---- + #define ret_addr_from_fp(fp) (unsigned)(((struct frame *)(fp))->fr_savpc) + #endif + +! #if defined(__FreeBSD__) +! #define prev_fp_from_fp(fp) *((unsigned *) fp) +! #define ret_addr_from_fp(fp) *((unsigned *) (fp+4)) +! #endif +! + /* for ultrix 0x38, 4.3 bsd 0x3d, other? + */ + +*************** +*** 134,137 **** +--- 138,145 ---- + + #ifdef mips + #define CRT0_ADDRESS 0x0 /* to be filled in later */ ++ #endif ++ ++ #ifdef __FreeBSD__ ++ #define CRT0_ADDRESS 0x10d3 + #endif diff --git a/devel/mprof/files/patch-mprof_mon.c b/devel/mprof/files/patch-mprof_mon.c new file mode 100644 index 000000000000..d526ecfa79ca --- /dev/null +++ b/devel/mprof/files/patch-mprof_mon.c @@ -0,0 +1,29 @@ +*** ../m/mprof_mon.c Tue Apr 20 13:36:09 1993 +--- mprof_mon.c Fri Sep 17 17:09:01 1993 +*************** +*** 5,10 **** +--- 5,11 ---- + */ + + #include <stdio.h> ++ #include <unistd.h> + #include <sys/file.h> + #include "mprof.h" + +*************** +*** 411,417 **** + #ifdef sun + on_exit(mprof_exit, NULL); + #endif +! #ifdef mips + atexit(mprof_exit); + #endif + +--- 412,418 ---- + #ifdef sun + on_exit(mprof_exit, NULL); + #endif +! #if defined(mips) || defined(__FreeBSD__) + atexit(mprof_exit); + #endif + |