Home | History | Annotate | Line # | Download | only in uvm
      1  1.56      mrg /*	$NetBSD: uvm_stat.h,v 1.56 2021/12/11 19:24:22 mrg Exp $	*/
      2   1.1      mrg 
      3   1.1      mrg /*
      4  1.50      mrg  * Copyright (c) 2011 Matthew R. Green
      5   1.1      mrg  * All rights reserved.
      6   1.1      mrg  *
      7   1.1      mrg  * Redistribution and use in source and binary forms, with or without
      8   1.1      mrg  * modification, are permitted provided that the following conditions
      9   1.1      mrg  * are met:
     10   1.1      mrg  * 1. Redistributions of source code must retain the above copyright
     11   1.1      mrg  *    notice, this list of conditions and the following disclaimer.
     12   1.1      mrg  * 2. Redistributions in binary form must reproduce the above copyright
     13   1.1      mrg  *    notice, this list of conditions and the following disclaimer in the
     14   1.1      mrg  *    documentation and/or other materials provided with the distribution.
     15   1.1      mrg  *
     16   1.1      mrg  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     17   1.1      mrg  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     18   1.1      mrg  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     19   1.1      mrg  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     20  1.50      mrg  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     21  1.50      mrg  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     22  1.50      mrg  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
     23  1.50      mrg  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     24  1.50      mrg  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     25  1.50      mrg  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     26  1.50      mrg  * SUCH DAMAGE.
     27  1.50      mrg  */
     28  1.50      mrg 
     29  1.50      mrg /*
     30  1.50      mrg  * Backwards compat for UVMHIST, in the new KERNHIST form.
     31   1.1      mrg  */
     32   1.6    perry 
     33   1.6    perry #ifndef _UVM_UVM_STAT_H_
     34   1.6    perry #define _UVM_UVM_STAT_H_
     35   1.7      mrg 
     36  1.22      mrg #if defined(_KERNEL_OPT)
     37   1.7      mrg #include "opt_uvmhist.h"
     38  1.50      mrg #include "opt_kernhist.h"
     39  1.43      chs #endif
     40   1.6    perry 
     41   1.1      mrg /*
     42  1.50      mrg  * Make UVMHIST_PRINT force on KERNHIST_PRINT for at least UVMHIST_* usage.
     43   1.1      mrg  */
     44  1.50      mrg #if defined(UVMHIST_PRINT) && !defined(KERNHIST_PRINT)
     45  1.50      mrg #define KERNHIST_PRINT 1
     46  1.50      mrg #endif
     47   1.1      mrg 
     48  1.50      mrg #include <sys/kernhist.h>
     49   1.1      mrg 
     50  1.50      mrg #ifdef UVMHIST
     51   1.1      mrg 
     52  1.53    skrll #define UVMHIST_DECL(NAME)			KERNHIST_DECL(NAME)
     53  1.53    skrll #define UVMHIST_DEFINE(NAME)			KERNHIST_DEFINE(NAME)
     54  1.53    skrll #define UVMHIST_INIT(NAME,N)			KERNHIST_INIT(NAME,N)
     55  1.53    skrll #define UVMHIST_INITIALIZER(NAME,BUF)		KERNHIST_INITIALIZER(NAME,BUF)
     56  1.53    skrll #define UVMHIST_LINK_STATIC(NAME)		KERNHIST_LINK_STATIC(NAME)
     57  1.53    skrll #define UVMHIST_LOG(NAME,FMT,A,B,C,D)		KERNHIST_LOG(NAME,FMT,A,B,C,D)
     58  1.53    skrll #define UVMHIST_CALLED(NAME)			KERNHIST_CALLED(NAME)
     59  1.53    skrll #define UVMHIST_CALLARGS(NAME,FMT,A,B,C,D)	KERNHIST_CALLARGS(NAME,FMT,A,B,C,D)
     60  1.53    skrll #define UVMHIST_FUNC(FNAME)			KERNHIST_FUNC(FNAME)
     61   1.9  thorpej 
     62  1.50      mrg #else
     63  1.12      mrg 
     64   1.1      mrg #define UVMHIST_DECL(NAME)
     65  1.51     matt #define UVMHIST_DEFINE(NAME)
     66   1.1      mrg #define UVMHIST_INIT(NAME,N)
     67  1.52     matt #define UVMHIST_INITIALIZER(NAME,BUF)
     68  1.52     matt #define UVMHIST_LINK_STATIC(NAME)
     69   1.1      mrg #define UVMHIST_LOG(NAME,FMT,A,B,C,D)
     70   1.1      mrg #define UVMHIST_CALLED(NAME)
     71  1.54    skrll #define UVMHIST_CALLARGS(NAME,FMT,A,B,C,D)
     72   1.1      mrg #define UVMHIST_FUNC(FNAME)
     73  1.50      mrg 
     74   1.1      mrg #endif
     75   1.1      mrg 
     76   1.6    perry #endif /* _UVM_UVM_STAT_H_ */
     77