aboutsummaryrefslogtreecommitdiff
path: root/sp/src/public/tier0/l2cache.h
blob: 2ee883311ad59de230338a0802c37025ab1b6931 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================//
#ifndef CL2CACHE_H
#define CL2CACHE_H
#ifdef _WIN32
#pragma once
#endif

class P4Event_BSQ_cache_reference;

class CL2Cache
{
public:

	CL2Cache();
	~CL2Cache();

	void Start( void );
	void End( void );

	//-------------------------------------------------------------------------
	// GetL2CacheMisses
	//-------------------------------------------------------------------------
	int GetL2CacheMisses( void )
	{
		return m_iL2CacheMissCount;
	}

#ifdef DBGFLAG_VALIDATE
	void Validate( CValidator &validator, tchar *pchName );		// Validate our internal structures
#endif // DBGFLAG_VALIDATE

private:

	int								m_nID;

	P4Event_BSQ_cache_reference		*m_pL2CacheEvent;
	int64							m_i64Start;
	int64							m_i64End;
	int								m_iL2CacheMissCount;
};

#endif   // CL2CACHE_H