counters.h revision e64031e20c39650a7bc902a3e1aba613b9415dee
/** $Id$ */
/** @file
* Counters macro invocation template.
*
* This is included with different PROFILE_COUNTER and COUNTING_COUNTER
* implementations to instantiate data members, create function prototypes and
* implement these prototypes.
*/
/*
* Copyright (C) 2007-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
/*
* COUNTERS_INIT is used before using counters.h to declare helping macro
* definitions for (de-)registering counters
*/
#ifndef COUNTERS_H
# define COUNTERS_H
# if defined(VBOX_WITH_STATISTICS)
do { \
type, \
units, \
dsc, \
} while (0)
# define DEREGISTER_COUNTER(name, storage) PDMDrvHlpSTAMDeregister(pDrvIns, &(storage)->Stat ## name)
# else
# endif
#else
#endif
#ifndef COUNTERS_INIT
# if !defined(PROFILE_COUNTER) && !defined(DRV_PROFILE_COUNTER)
# endif
# if !defined(COUNTING_COUNTER) && !defined(DRV_COUNTING_COUNTER)
# endif
/*
* DRV_ prefixed are counters used in DrvNAT the rest are used in Slirp
*/
# if defined(PROFILE_COUNTER) || defined(COUNTING_COUNTER)
# else
/*DrvNAT.cpp*/
DRV_COUNTING_COUNTER(ConsumerFalse, "counting consumer's reject number to process the queue's item");
# endif
#endif /*!COUNTERS_INIT*/
#ifdef DRV_COUNTING_COUNTER
#endif
#ifdef DRV_PROFILE_COUNTER
#endif
#ifdef COUNTING_COUNTER
#endif
#ifdef PROFILE_COUNTER
#endif