Date: Mon, 26 Jun 2006 06:18:22 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 100035 for review Message-ID: <200606260618.k5Q6IMwR023427@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100035 Change 100035 by jb@jb_freebsd2 on 2006/06/26 06:17:54 Add system initialisation callbacks from the dtrace module and the anonymous enablings. The provider initialisation takes place between the two. This change moves the DTrace initialistion a lot earlier in the kernel boot process, thereby allowing tracing of all the device probing etc. On my development box the early part of the dmesg looks like this when booting with DTrace modules loaded: Copyright (c) 1992-2006 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 7.0-CURRENT #68: Mon Jun 26 09:29:31 EST 2006 jbr@freebsd7.cimlogic.com.au:/u2/freebsd/obj/freebsd2/u2/p4/dtrace/src/sys/DTRACE Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (2400.10-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf27 Stepping = 7 Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> Features2=0x400<CNTX-ID> real memory = 503300096 (479 MB) avail memory = 482922496 (460 MB) ACPI APIC Table: <ASUS P4S533MX> DTrace registered provider 'dtrace' DTrace registered provider 'sdt' DTrace registered provider 'fbt' DTrace registered provider 'profile' DTrace registered provider 'syscall' DTrace enabling probe (:::BEGIN) DTrace enabling probe (:::ERROR) ioapic0 <Version 8.0> irqs 0-23 on motherboard kbd1 at kbdmux0 acpi0: <ASUS P4S533MX> on motherboard acpi0: Overriding SCI Interrupt from IRQ 9 to IRQ 20 acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0xe408-0xe40b on acpi0 Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#30 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#30 (text+ko) ==== @@ -86,7 +86,7 @@ static d_close_t dtrace_close; static d_ioctl_t dtrace_ioctl; static d_open_t dtrace_open; -static int dtrace_load(void); +static void dtrace_load(void *); static int dtrace_unload(void); static void dtrace_clone(void *, struct ucred *, char *, int , struct cdev **); @@ -512,6 +512,7 @@ static void dtrace_action_stop(void); static void dtrace_action_ustack(dtrace_mstate_t *, dtrace_state_t *, uint64_t *, uint64_t); static void dtrace_aggregate(dtrace_aggregation_t *, dtrace_buffer_t *, intptr_t, dtrace_buffer_t *, uint64_t, uint64_t); +static void dtrace_anon_init(void *); static void dtrace_anon_property(void); static void dtrace_bcopy(const void *, void *, size_t); static void dtrace_buffer_drop(dtrace_buffer_t *); @@ -665,6 +666,9 @@ #include <cddl/dev/dtrace/i386/dtrace_isa.c> #endif +SYSINIT(dtrace_load, SI_SUB_DTRACE, SI_ORDER_FIRST, dtrace_load, NULL) +SYSINIT(dtrace_anon_init, SI_SUB_DTRACE_ANON, SI_ORDER_FIRST, dtrace_anon_init, NULL) + DEV_MODULE(dtrace, dtrace_modevent, NULL); MODULE_VERSION(dtrace, 1); MODULE_DEPEND(dtrace, cyclic, 1, 1, 1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606260618.k5Q6IMwR023427>