Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

Defines | Functions | Variables

kProfileR3.cpp File Reference

#include <k/kDefs.h>
#include <k/kTypes.h>
#include "prfcore.h.h"
#include "prfcorepre.cpp.h"
#include "prfcoremodseg.cpp.h"
#include "prfcorefunction.cpp.h"
#include "prfcore.cpp.h"
#include "prfcoreinit.cpp.h"
#include "prfcoreterm.cpp.h"
#include "prfcorepost.cpp.h"
Include dependency graph for kProfileR3.cpp:

Go to the source code of this file.

Defines

#define KPRF_ASSERT(expr)   do { if (!(expr)) { __debugbreak(); } } while (0)
#define KPRF_ATOMIC_ADD32(a, b)   kPrfAtomicAdd32(a, b)
#define KPRF_ATOMIC_ADD64(a, b)   kPrfAtomicAdd64(a, b)
#define KPRF_ATOMIC_DEC32(a)   kPrfAtomicAdd32(a, (KU32)-1);
#define KPRF_ATOMIC_INC32(a)   kPrfAtomicAdd32(a, 1);
#define KPRF_ATOMIC_INC64(a)   kPrfAtomicAdd64(a, 1);
#define KPRF_ATOMIC_SET32(a, b)   kPrfAtomicSet32(a, b)
#define KPRF_ATOMIC_SET64(a, b)   kPrfAtomicSet64(a, b)
#define KPRF_DECL_FUNC(type, name)   extern "C" type KPRF_NAME(name)
#define KPRF_FUNCS_READ_LOCK()   kPrfRWLockAcquireRead(&g_FunctionsRWLock)
#define KPRF_FUNCS_READ_UNLOCK()   kPrfRWLockReleaseRead(&g_FunctionsRWLock)
#define KPRF_FUNCS_WRITE_LOCK()   kPrfRWLockAcquireWrite(&g_FunctionsRWLock)
#define KPRF_FUNCS_WRITE_UNLOCK()   kPrfRWLockReleaseWrite(&g_FunctionsRWLock)
#define KPRF_GET_HDR()   g_pHdr
#define KPRF_GET_MODSEG(uAddress, pszPath, cchPath, piSegment, puBasePtr, pcbSegmentMinusOne)   kPrfGetModSeg(uAddress, pszPath, cchPath, piSegment, puBasePtr, pcbSegmentMinusOne)
#define KPRF_GET_PROCESSID()   kPrfGetProcessId()
#define KPRF_GET_THREAD()   kPrfGetThread()
#define KPRF_GET_THREADID()   kPrfGetThreadId()
#define KPRF_IS_ACTIVE()   g_fEnabled
#define KPRF_MODSEGS_LOCK()   kPrfMutexAcquire(&g_ModSegsMutex)
#define KPRF_MODSEGS_UNLOCK()   kPrfMutexRelease(&g_ModSegsMutex)
#define KPRF_NAME(Suffix)   KPrf##Suffix
#define KPRF_NOW()   kPrfNow()
#define KPRF_SET_THREAD(pThread)   kPrfSetThread(pThread)
#define KPRF_THREADS_LOCK()   kPrfMutexAcquire(&g_ThreadsMutex)
#define KPRF_THREADS_UNLOCK()   kPrfMutexRelease(&g_ThreadsMutex)
#define KPRF_TYPE(Prefix, Suffix)   Prefix##KPRF##Suffix

Functions

typedef KPRF_TYPE (, MUTEX)*KPRF_TYPE(P
typedef KPRF_TYPE (, RWLOCK)*KPRF_TYPE(P
static KPRF_TYPE (P, THREAD) kPrfGetThreadAutoReg(void)
static KPRF_TYPE (P, HDR) g_pHdr
static void * kPrfAllocMem (KU32 cb)
static void kPrfAtomicAdd32 (volatile KU32 *pu32, const KU32 u32)
static void kPrfAtomicAdd64 (volatile KU64 *pu64, const KU64 u64)
static void kPrfAtomicSet32 (volatile KU32 *pu32, const KU32 u32)
static void kPrfAtomicSet64 (volatile KU64 *pu64, KU64 u64)
static void kPrfFreeMem (void *pv)
static char * kPrfGetEnvString (const char *pszVar, char *pszValue, KU32 cchValue, const char *pszDefault)
static KU32 kPrfGetEnvValue (const char *pszVar, KU32 uDefault)
static int kPrfGetModSeg (KPRF_TYPE(, UPTR) uAddress, char *pszPath, KU32 cchPath, KU32 *piSegment, KPRF_TYPE(P, UPTR) puBasePtr, KPRF_TYPE(P, UPTR) pcbSegmentMinusOne)
static KUPTR kPrfGetProcessId (void)
static KUPTR kPrfGetThreadId (void)
int kPrfInitialize (void)
static void kPrfMutexAcquire (KPRF_TYPE(P, MUTEX) pMutex)
static void kPrfMutexDelete (KPRF_TYPE(P, MUTEX) pMutex)
static int kPrfMutexInit (KPRF_TYPE(P, MUTEX) pMutex)
static void kPrfMutexRelease (KPRF_TYPE(P, MUTEX) pMutex)
static KU64 kPrfNow (void)
static void kPrfRWLockAcquireRead (KPRF_TYPE(P, RWLOCK) pRWLock)
static void kPrfRWLockAcquireWrite (KPRF_TYPE(P, RWLOCK) pRWLock)
static void kPrfRWLockDelete (KPRF_TYPE(P, RWLOCK) pRWLock)
static int kPrfRWLockInit (KPRF_TYPE(P, RWLOCK) pRWLock)
static void kPrfRWLockReleaseRead (KPRF_TYPE(P, RWLOCK) pRWLock)
static void kPrfRWLockReleaseWrite (KPRF_TYPE(P, RWLOCK) pRWLock)
static void kPrfSetThread (KPRF_TYPE(P, THREAD) pThread)
int kPrfTerminate (void)
void kPrfTerminateThread (void)
static int kPrfWriteFile (const char *pszName, const void *pvData, KU32 cbData)

Variables

static bool g_fEnabled = false
typedef MUTEX
typedef RWLOCK

Detailed Description

kProfiler Mark 2 - The Ring-3 Implementation.

Definition in file kProfileR3.cpp.


Generated by  Doxygen 1.6.0   Back to index