counters.h revision 3fa88ed5980bc097e9f97063a9965d2cf771c5f3
eb6509c759a277527b791759757d9d9a5b1c5e32vboxsync * Counters macro invocation template.
eb6509c759a277527b791759757d9d9a5b1c5e32vboxsync * This is included with different PROFILE_COUNTER and COUNTING_COUNTER
eb6509c759a277527b791759757d9d9a5b1c5e32vboxsync * implementations to instantiate data members, create function prototypes and
eb6509c759a277527b791759757d9d9a5b1c5e32vboxsync * implement these prototypes.
eb6509c759a277527b791759757d9d9a5b1c5e32vboxsync * Copyright (C) 2007-2009 Sun Microsystems, Inc.
d981a844e64c196b4c96be1a52ddc42e23337138vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
d981a844e64c196b4c96be1a52ddc42e23337138vboxsync * available from http://www.virtualbox.org. This file is free software;
d981a844e64c196b4c96be1a52ddc42e23337138vboxsync * you can redistribute it and/or modify it under the terms of the GNU
d981a844e64c196b4c96be1a52ddc42e23337138vboxsync * General Public License (GPL) as published by the Free Software
d981a844e64c196b4c96be1a52ddc42e23337138vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
d981a844e64c196b4c96be1a52ddc42e23337138vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
d981a844e64c196b4c96be1a52ddc42e23337138vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
d981a844e64c196b4c96be1a52ddc42e23337138vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
d981a844e64c196b4c96be1a52ddc42e23337138vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
d981a844e64c196b4c96be1a52ddc42e23337138vboxsync * additional information or have any questions.
640c5443600563afd4f0759c0f0ad4249f065577vboxsync * COUNTERS_INIT is used before using counters.h to declare helping macro
d981a844e64c196b4c96be1a52ddc42e23337138vboxsync * definitions for (de-)registering counters
eb6509c759a277527b791759757d9d9a5b1c5e32vboxsync } while (0)
169154fcc4bae3ca771f32a6c11cc0a06f04d505vboxsync# define DEREGISTER_COUNTER(name) PDMDrvHlpSTAMDeregister(pDrvIns, &pData->Stat ## name)
eb6509c759a277527b791759757d9d9a5b1c5e32vboxsync# define REGISTER_COUNTER(name, type, units, dsc) do {} while (0)
eb6509c759a277527b791759757d9d9a5b1c5e32vboxsync# if !defined(PROFILE_COUNTER) && !defined(DRV_PROFILE_COUNTER)
eb6509c759a277527b791759757d9d9a5b1c5e32vboxsync# if !defined(COUNTING_COUNTER) && !defined(DRV_COUNTING_COUNTER)
eb6509c759a277527b791759757d9d9a5b1c5e32vboxsync * DRV_ prefixed are counters used in DrvNAT the rest are used in Slirp
eb6509c759a277527b791759757d9d9a5b1c5e32vboxsync# define COUNTING_COUNTER(name, dsc) do {} while (0)
eb6509c759a277527b791759757d9d9a5b1c5e32vboxsync# define DRV_PROFILE_COUNTER(name, dsc) do {} while (0)
95ff7c92406f8e3cc892ec0ed9be7d06c49e302cvboxsync# define DRV_COUNTING_COUNTER(name, dsc) do {} while (0)
caff8bc1842e1ba69d4115103177264909cbb97bvboxsyncPROFILE_COUNTER(FastTimer, "Profiling slirp fast timer");
eeea67e86500e2fe13ace42b86653498e3d656aavboxsyncPROFILE_COUNTER(SlowTimer, "Profiling slirp slow timer");
#ifdef DRV_COUNTING_COUNTER
#ifdef DRV_PROFILE_COUNTER
#ifdef COUNTING_COUNTER
#ifdef PROFILE_COUNTER