[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sys/dtrace_bsd.h

Version: -  FREEBSD  -  FREEBSD10  -  FREEBSD9  -  FREEBSD92  -  FREEBSD91  -  FREEBSD90  -  FREEBSD8  -  FREEBSD82  -  FREEBSD81  -  FREEBSD80  -  FREEBSD7  -  FREEBSD74  -  FREEBSD73  -  FREEBSD72  -  FREEBSD71  -  FREEBSD70  -  FREEBSD6  -  FREEBSD64  -  FREEBSD63  -  FREEBSD62  -  FREEBSD61  -  FREEBSD60  -  FREEBSD5  -  FREEBSD55  -  FREEBSD54  -  FREEBSD53  -  FREEBSD52  -  FREEBSD51  -  FREEBSD50  -  FREEBSD4  -  FREEBSD3  -  FREEBSD22  -  cheribsd  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1  -  FREEBSD-LIBC  -  FREEBSD8-LIBC  -  FREEBSD7-LIBC  -  FREEBSD6-LIBC  -  GLIBC27 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 2007-2008 John Birrell (jb@freebsd.org)
    3  * 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
    9  *    notice, this list of conditions and the following disclaimer.
   10  * 2. Redistributions in binary form must reproduce the above copyright
   11  *    notice, this list of conditions and the following disclaimer in the
   12  *    documentation and/or other materials provided with the distribution.
   13  *
   14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   15  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   17  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   18  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   19  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   20  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   21  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   22  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   23  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   24  * SUCH DAMAGE.
   25  *
   26  * $FreeBSD$
   27  *
   28  * This file contains BSD shims for Sun's DTrace code.
   29  */
   30 
   31 #ifndef _SYS_DTRACE_BSD_H
   32 #define _SYS_DTRACE_BSD_H
   33 
   34 /* Forward definitions: */
   35 struct trapframe;
   36 struct thread;
   37 
   38 /*
   39  * Cyclic clock function type definition used to hook the cyclic
   40  * subsystem into the appropriate timer interrupt.
   41  */
   42 typedef void (*cyclic_clock_func_t)(struct trapframe *);
   43 
   44 /*
   45  * These external variables are actually machine-dependent, so
   46  * they might not actually exist.
   47  *
   48  * Defining them here avoids a proliferation of header files.
   49  */
   50 extern cyclic_clock_func_t     lapic_cyclic_clock_func[];
   51 
   52 /*
   53  * The dtrace module handles traps that occur during a DTrace probe.
   54  * This type definition is used in the trap handler to provide a
   55  * hook for the dtrace module to register it's handler with.
   56  */
   57 typedef int (*dtrace_trap_func_t)(struct trapframe *, u_int);
   58 
   59 int     dtrace_trap(struct trapframe *, u_int);
   60 
   61 extern dtrace_trap_func_t       dtrace_trap_func;
   62 
   63 /* Used by the machine dependent trap() code. */
   64 typedef int (*dtrace_invop_func_t)(uintptr_t, uintptr_t *, uintptr_t);
   65 typedef void (*dtrace_doubletrap_func_t)(void);
   66 
   67 /* Global variables in trap.c */
   68 extern  dtrace_invop_func_t     dtrace_invop_func;
   69 extern  dtrace_doubletrap_func_t        dtrace_doubletrap_func;
   70 
   71 /* Virtual time hook function type. */
   72 typedef void (*dtrace_vtime_switch_func_t)(struct thread *);
   73 
   74 extern int                      dtrace_vtime_active;
   75 extern dtrace_vtime_switch_func_t       dtrace_vtime_switch_func;
   76 
   77 /* The fasttrap module hooks into the fork, exit and exit. */
   78 typedef void (*dtrace_fork_func_t)(struct proc *, struct proc *);
   79 typedef void (*dtrace_execexit_func_t)(struct proc *);
   80 
   81 /* Global variable in kern_fork.c */
   82 extern dtrace_fork_func_t       dtrace_fasttrap_fork;
   83 
   84 /* Global variable in kern_exec.c */
   85 extern dtrace_execexit_func_t   dtrace_fasttrap_exec;
   86 
   87 /* Global variable in kern_exit.c */
   88 extern dtrace_execexit_func_t   dtrace_fasttrap_exit;
   89 
   90 /* The dtmalloc provider hooks into malloc. */
   91 typedef void (*dtrace_malloc_probe_func_t)(u_int32_t, uintptr_t arg0,
   92     uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t arg4);
   93 
   94 extern dtrace_malloc_probe_func_t   dtrace_malloc_probe;
   95 
   96 /*
   97  * Functions which allow the dtrace module to check that the kernel 
   98  * hooks have been compiled with sufficient space for it's private
   99  * structures.
  100  */
  101 size_t  kdtrace_proc_size(void);
  102 size_t  kdtrace_thread_size(void);
  103 
  104 /*
  105  * OpenSolaris compatible time functions returning nanoseconds.
  106  * On OpenSolaris these return hrtime_t which we define as uint64_t.
  107  */
  108 uint64_t        dtrace_gethrtime(void);
  109 uint64_t        dtrace_gethrestime(void);
  110 
  111 #endif /* _SYS_DTRACE_BSD_H */

Cache object: 35b92977cb9b8ed14e8b5c5d48e8a7d4


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.