The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


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

FreeBSD/Linux Kernel Cross Reference
sys/kern/xpr.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* 
    2  * Mach Operating System
    3  * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
    4  * All Rights Reserved.
    5  * 
    6  * Permission to use, copy, modify and distribute this software and its
    7  * documentation is hereby granted, provided that both the copyright
    8  * notice and this permission notice appear in all copies of the
    9  * software, derivative works or modified versions, and any portions
   10  * thereof, and that both notices appear in supporting documentation.
   11  * 
   12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15  * 
   16  * Carnegie Mellon requests users of this software to return to
   17  * 
   18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19  *  School of Computer Science
   20  *  Carnegie Mellon University
   21  *  Pittsburgh PA 15213-3890
   22  * 
   23  * any improvements or extensions that they make and grant Carnegie Mellon
   24  * the rights to redistribute these changes.
   25  */
   26 /*
   27  * HISTORY
   28  * $Log:        xpr.h,v $
   29  * Revision 2.4  92/05/21  17:17:17  jfriedl
   30  *      Added 'extern void xpr()', etc.
   31  *      [92/05/16            jfriedl]
   32  * 
   33  * Revision 2.3  91/05/14  16:50:21  mrt
   34  *      Correcting copyright
   35  * 
   36  * Revision 2.2  91/02/05  17:31:18  mrt
   37  *      MACH_KERNEL: removed conditionals.
   38  *      [88/12/19            dbg]
   39  * 
   40  * Revision 2.1  89/08/03  15:57:39  rwd
   41  * Created.
   42  * 
   43  * Revision 2.5  88/12/19  02:51:59  mwyoung
   44  *      Added VM system tags.
   45  *      [88/11/22            mwyoung]
   46  * 
   47  * Revision 2.4  88/08/24  02:55:54  mwyoung
   48  *      Adjusted include file references.
   49  *      [88/08/17  02:29:56  mwyoung]
   50  * 
   51  *
   52  *  9-Apr-88  Daniel Julin (dpj) at Carnegie-Mellon University
   53  *      Added flags for TCP and MACH_NP debugging.
   54  *
   55  *  6-Jan-88  Michael Young (mwyoung) at Carnegie-Mellon University
   56  *      Make the event structure smaller to make it easier to read from
   57  *      kernel debuggers.
   58  *
   59  * 16-Mar-87  Mike Accetta (mja) at Carnegie-Mellon University
   60  *      MACH:  made XPR_DEBUG definition conditional on MACH
   61  *      since the routines invoked under it won't link without MACH.
   62  *      [ V5.1(F7) ]
   63  */
   64 /*
   65  * Include file for xpr circular buffer silent tracing.  
   66  *
   67  */
   68 /*
   69  * If the kernel flag XPRDEBUG is set, the XPR macro is enabled.  The 
   70  * macro should be invoked something like the following:
   71  *      XPR(XPR_SYSCALLS, ("syscall: %d, 0x%x\n", syscallno, arg1);
   72  * which will expand into the following code:
   73  *      if (xprflags & XPR_SYSCALLS)
   74  *              xpr("syscall: %d, 0x%x\n", syscallno, arg1);
   75  * Xpr will log the pointer to the printf string and up to 6 arguements,
   76  * along with a timestamp and cpuinfo (for multi-processor systems), into
   77  * a circular buffer.  The actual printf processing is delayed until after
   78  * the buffer has been collected.  It is assumed that the text/data segments
   79  * of the kernel can easily be reconstructed in a post-processor which
   80  * performs the printf processing.
   81  *
   82  * If the XPRDEBUG compilation switch is not set, the XPR macro expands 
   83  * to nothing.
   84  */
   85 
   86 #ifndef _KERN_XPR_H_
   87 #define _KERN_XPR_H_
   88 
   89 #ifdef  KERNEL
   90 #include <xpr_debug.h>
   91 #else   KERNEL
   92 #include <sys/features.h>
   93 #endif  KERNEL
   94 
   95 #include <machine/xpr.h>
   96 
   97 #if     XPR_DEBUG
   98 
   99 #define XPR(flags,xprargs) if(xprflags&flags) xpr xprargs
  100 
  101 extern int xprflags;
  102 /*
  103  * flags for message types.
  104  */
  105 #define XPR_SYSCALLS    0x00000001
  106 #define XPR_TRAPS       0x00000002
  107 #define XPR_SCHED       0x00000004
  108 #define XPR_NPTCP       0x00000008
  109 #define XPR_NP          0x00000010
  110 #define XPR_TCP         0x00000020
  111 
  112 #define XPR_VM_OBJECT           (1 << 8)
  113 #define XPR_VM_OBJECT_CACHE     (1 << 9)
  114 #define XPR_VM_PAGE             (1 << 10)
  115 #define XPR_VM_PAGEOUT          (1 << 11)
  116 #define XPR_MEMORY_OBJECT       (1 << 12)
  117 #define XPR_VM_FAULT            (1 << 13)
  118 #define XPR_INODE_PAGER         (1 << 14)
  119 #define XPR_INODE_PAGER_DATA    (1 << 15)
  120 
  121 #else   XPR_DEBUG
  122 #define XPR(flags,xprargs)
  123 #endif  XPR_DEBUG
  124 
  125 struct xprbuf {
  126         char    *msg;
  127         int     arg1,arg2,arg3,arg4,arg5;
  128         int     timestamp;
  129         int     cpuinfo;
  130 };
  131 
  132 #ifndef WANT_PROTOTYPES
  133 extern void xpr();
  134 #endif
  135 extern void xpr_dump();
  136 extern void xprinit();
  137 extern void xprbootstrap();
  138 
  139 #endif _KERN_XPR_H_

Cache object: c5dc66456597920be9453799c4830465


[ 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.