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/fs/nfsclient/nfs_kdtrace.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  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 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
    3  *
    4  * Copyright (c) 2009 Robert N. M. Watson
    5  * All rights reserved.
    6  *
    7  * This software was developed at the University of Cambridge Computer
    8  * Laboratory with support from a grant from Google, Inc.
    9  *
   10  * Redistribution and use in source and binary forms, with or without
   11  * modification, are permitted provided that the following conditions
   12  * are met:
   13  * 1. Redistributions of source code must retain the above copyright
   14  *    notice, this list of conditions and the following disclaimer.
   15  * 2. Redistributions in binary form must reproduce the above copyright
   16  *    notice, this list of conditions and the following disclaimer in the
   17  *    documentation and/or other materials provided with the distribution.
   18  *
   19  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   20  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   22  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   23  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   24  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   25  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   26  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   27  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   28  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   29  * SUCH DAMAGE.
   30  *
   31  * $FreeBSD: releng/12.0/sys/fs/nfsclient/nfs_kdtrace.h 326268 2017-11-27 15:15:37Z pfg $
   32  */
   33 
   34 #ifndef _NFSCL_NFS_KDTRACE_H_
   35 #define _NFSCL_NFS_KDTRACE_H_
   36 
   37 /*
   38  * Definitions for NFS access cache probes.
   39  */
   40 extern uint32_t nfscl_accesscache_flush_done_id;
   41 extern uint32_t nfscl_accesscache_get_hit_id;
   42 extern uint32_t nfscl_accesscache_get_miss_id;
   43 extern uint32_t nfscl_accesscache_load_done_id;
   44 
   45 /*
   46  * Definitions for NFS attribute cache probes.
   47  */
   48 extern uint32_t nfscl_attrcache_flush_done_id;
   49 extern uint32_t nfscl_attrcache_get_hit_id;
   50 extern uint32_t nfscl_attrcache_get_miss_id;
   51 extern uint32_t nfscl_attrcache_load_done_id;
   52 
   53 #ifdef KDTRACE_HOOKS
   54 #include <sys/dtrace_bsd.h>
   55 
   56 #define KDTRACE_NFS_ACCESSCACHE_FLUSH_DONE(vp)  do {                    \
   57         if (dtrace_nfscl_accesscache_flush_done_probe != NULL)          \
   58                 (dtrace_nfscl_accesscache_flush_done_probe)(            \
   59                     nfscl_accesscache_flush_done_id, (vp));             \
   60 } while (0)
   61 
   62 #define KDTRACE_NFS_ACCESSCACHE_GET_HIT(vp, uid, mode)  do {            \
   63         if (dtrace_nfscl_accesscache_get_hit_probe != NULL)             \
   64                 (dtrace_nfscl_accesscache_get_hit_probe)(               \
   65                     nfscl_accesscache_get_hit_id, (vp), (uid),          \
   66                     (mode));                                            \
   67 } while (0)
   68         
   69 #define KDTRACE_NFS_ACCESSCACHE_GET_MISS(vp, uid, mode) do {            \
   70         if (dtrace_nfscl_accesscache_get_miss_probe != NULL)            \
   71                 (dtrace_nfscl_accesscache_get_miss_probe)(              \
   72                     nfscl_accesscache_get_miss_id, (vp), (uid),         \
   73                     (mode));                                            \
   74 } while (0)
   75 
   76 #define KDTRACE_NFS_ACCESSCACHE_LOAD_DONE(vp, uid, rmode, error) do {   \
   77         if (dtrace_nfscl_accesscache_load_done_probe != NULL)           \
   78                 (dtrace_nfscl_accesscache_load_done_probe)(             \
   79                     nfscl_accesscache_load_done_id, (vp), (uid),        \
   80                     (rmode), (error));                                  \
   81 } while (0)
   82 
   83 #define KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp)    do {                    \
   84         if (dtrace_nfscl_attrcache_flush_done_probe != NULL)            \
   85                 (dtrace_nfscl_attrcache_flush_done_probe)(              \
   86                     nfscl_attrcache_flush_done_id, (vp));               \
   87 } while (0)
   88 
   89 #define KDTRACE_NFS_ATTRCACHE_GET_HIT(vp, vap)  do {                    \
   90         if (dtrace_nfscl_attrcache_get_hit_probe != NULL)               \
   91                 (dtrace_nfscl_attrcache_get_hit_probe)(                 \
   92                     nfscl_attrcache_get_hit_id, (vp), (vap));           \
   93 } while (0)
   94 
   95 #define KDTRACE_NFS_ATTRCACHE_GET_MISS(vp)      do {                    \
   96         if (dtrace_nfscl_attrcache_get_miss_probe != NULL)              \
   97                 (dtrace_nfscl_attrcache_get_miss_probe)(                \
   98                             nfscl_attrcache_get_miss_id, (vp));         \
   99 } while (0)
  100 
  101 #define KDTRACE_NFS_ATTRCACHE_LOAD_DONE(vp, vap, error) do {            \
  102         if (dtrace_nfscl_attrcache_load_done_probe != NULL)             \
  103                 (dtrace_nfscl_attrcache_load_done_probe)(               \
  104                     nfscl_attrcache_load_done_id, (vp), (vap),          \
  105                     (error));                                           \
  106 } while (0)
  107 
  108 #else /* !KDTRACE_HOOKS */
  109 
  110 #define KDTRACE_NFS_ACCESSCACHE_FLUSH_DONE(vp)
  111 #define KDTRACE_NFS_ACCESSCACHE_GET_HIT(vp, uid, mode)
  112 #define KDTRACE_NFS_ACCESSCACHE_GET_MISS(vp, uid, mode)
  113 #define KDTRACE_NFS_ACCESSCACHE_LOAD_DONE(vp, uid, rmode, error)
  114 
  115 #define KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp)
  116 #define KDTRACE_NFS_ATTRCACHE_GET_HIT(vp, vap)
  117 #define KDTRACE_NFS_ATTRCACHE_GET_MISS(vp)
  118 #define KDTRACE_NFS_ATTRCACHE_LOAD_DONE(vp, vap, error)
  119 
  120 #endif /* KDTRACE_HOOKS */
  121 
  122 #endif /* !_NFSCL_NFS_KDTRACE_H_ */

Cache object: d4cf6c454bd359554148a8f2b2f0f153


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