Home | History | Annotate | Line # | Download | only in uvm
uvm_stat.h revision 1.51
      1  1.51     matt /*	$NetBSD: uvm_stat.h,v 1.51 2012/07/30 23:56:48 matt 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.50      mrg  * 3. The name of the author may not be used to endorse or promote products
     16  1.50      mrg  *    derived from this software without specific prior written permission.
     17   1.1      mrg  *
     18   1.1      mrg  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     19   1.1      mrg  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     20   1.1      mrg  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     21   1.1      mrg  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     22  1.50      mrg  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     23  1.50      mrg  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     24  1.50      mrg  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
     25  1.50      mrg  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     26  1.50      mrg  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     27  1.50      mrg  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     28  1.50      mrg  * SUCH DAMAGE.
     29  1.50      mrg  */
     30  1.50      mrg 
     31  1.50      mrg /*
     32  1.50      mrg  * Backwards compat for UVMHIST, in the new KERNHIST form.
     33   1.1      mrg  */
     34   1.6    perry 
     35   1.6    perry #ifndef _UVM_UVM_STAT_H_
     36   1.6    perry #define _UVM_UVM_STAT_H_
     37   1.7      mrg 
     38  1.22      mrg #if defined(_KERNEL_OPT)
     39   1.7      mrg #include "opt_uvmhist.h"
     40  1.50      mrg #include "opt_kernhist.h"
     41  1.43      chs #endif
     42   1.6    perry 
     43   1.1      mrg /*
     44  1.50      mrg  * Make UVMHIST_PRINT force on KERNHIST_PRINT for at least UVMHIST_* usage.
     45   1.1      mrg  */
     46  1.50      mrg #if defined(UVMHIST_PRINT) && !defined(KERNHIST_PRINT)
     47  1.50      mrg #define KERNHIST_PRINT 1
     48  1.50      mrg #endif
     49   1.1      mrg 
     50  1.50      mrg #include <sys/kernhist.h>
     51   1.1      mrg 
     52  1.50      mrg #ifdef UVMHIST
     53   1.1      mrg 
     54  1.50      mrg #define UVMHIST_DECL(NAME)		KERNHIST_DECL(NAME)
     55  1.51     matt #define UVMHIST_DEFINE(NAME)		KERNHIST_DEFINE(NAME)
     56  1.50      mrg #define UVMHIST_INIT(NAME,N)		KERNHIST_INIT(NAME,N)
     57  1.50      mrg #define UVMHIST_INIT_STATIC(NAME,BUF)	KERNHIST_INIT_STATIC(NAME,BUF)
     58  1.50      mrg #define UVMHIST_LOG(NAME,FMT,A,B,C,D)	KERNHIST_LOG(NAME,FMT,A,B,C,D)
     59  1.50      mrg #define UVMHIST_CALLED(NAME)		KERNHIST_CALLED(NAME)
     60  1.50      mrg #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.1      mrg #define UVMHIST_INIT_STATIC(NAME,BUF)
     68   1.1      mrg #define UVMHIST_LOG(NAME,FMT,A,B,C,D)
     69   1.1      mrg #define UVMHIST_CALLED(NAME)
     70   1.1      mrg #define UVMHIST_FUNC(FNAME)
     71  1.50      mrg 
     72   1.1      mrg #endif
     73   1.1      mrg 
     74   1.6    perry #endif /* _UVM_UVM_STAT_H_ */
     75