Deleted Added
full compact
subr_prof.c (10407) subr_prof.c (10653)
1/*-
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)subr_prof.c 8.3 (Berkeley) 9/23/93
1/*-
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)subr_prof.c 8.3 (Berkeley) 9/23/93
34 * $Id: subr_prof.c,v 1.7 1995/08/28 09:18:46 julian Exp $
34 * $Id: subr_prof.c,v 1.8 1995/08/29 03:09:05 bde Exp $
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/kernel.h>
40#include <sys/proc.h>
41#include <vm/vm.h>
42#include <sys/sysctl.h>
43#include <sys/user.h>
44
45#include <machine/cpu.h>
46
47#ifdef GPROF
48#include <sys/malloc.h>
49#include <sys/gmon.h>
50
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/kernel.h>
40#include <sys/proc.h>
41#include <vm/vm.h>
42#include <sys/sysctl.h>
43#include <sys/user.h>
44
45#include <machine/cpu.h>
46
47#ifdef GPROF
48#include <sys/malloc.h>
49#include <sys/gmon.h>
50
51static void kmstartup __P((caddr_t));
51static void kmstartup __P((void *));
52SYSINIT(kmem, SI_SUB_KPROF, SI_ORDER_FIRST, kmstartup, NULL)
53
54struct gmonparam _gmonparam = { GMON_PROF_OFF };
55
56extern char btext[];
57extern char etext[];
58
59static void
60kmstartup(udata)
52SYSINIT(kmem, SI_SUB_KPROF, SI_ORDER_FIRST, kmstartup, NULL)
53
54struct gmonparam _gmonparam = { GMON_PROF_OFF };
55
56extern char btext[];
57extern char etext[];
58
59static void
60kmstartup(udata)
61 caddr_t udata;
61 void *udata;
62{
63 char *cp;
64 struct gmonparam *p = &_gmonparam;
65 /*
66 * Round lowpc and highpc to multiples of the density we're using
67 * so the rest of the scaling (here and in gprof) stays in ints.
68 */
69 p->lowpc = ROUNDDOWN((u_long)btext, HISTFRACTION * sizeof(HISTCOUNTER));

--- 196 unchanged lines hidden ---
62{
63 char *cp;
64 struct gmonparam *p = &_gmonparam;
65 /*
66 * Round lowpc and highpc to multiples of the density we're using
67 * so the rest of the scaling (here and in gprof) stays in ints.
68 */
69 p->lowpc = ROUNDDOWN((u_long)btext, HISTFRACTION * sizeof(HISTCOUNTER));

--- 196 unchanged lines hidden ---