Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
1.0 KiB

  1. //========= Copyright c 2009, Valve Corporation, All rights reserved. ============//
  2. #ifndef TIER1_MINIPROFILER_HASH_HDR
  3. #define TIER1_MINIPROFILER_HASH_HDR
  4. #include "tier0/miniprofiler.h"
  5. #if ENABLE_HARDWARE_PROFILER
  6. extern CLinkedMiniProfiler *HashMiniProfiler( const char *pString ); // may be defined in tier1; not very elegant, but it seems overkill to move this to a new tier1 header
  7. extern CLinkedMiniProfiler *HashMiniProfilerF( const char *pFormat, ... ); // may be defined in tier1; not very elegant, but it seems overkill to move this to a new tier1 header
  8. #define MINI_PROFILE(NAME) CMiniProfilerGuard miniProfilerGuard##__LINE__(HashMiniProfiler(NAME))
  9. #define MINI_PROFILE_F(PRINT,...) CMiniProfilerGuard miniProfilerGuard##__LINE__(HashMiniProfilerF(PRINT,__VA_ARGS__))
  10. #define MINI_PROFILE_CALLS(NAME,NUM_CALLS) CMiniProfilerGuard miniProfilerGuard##__LINE__(HashMiniProfiler(NAME),(NUM_CALLS))
  11. #else
  12. #define MINI_PROFILE(NAME)
  13. #define MINI_PROFILE_F(PRINT,...)
  14. #define MINI_PROFILE_CALLS(NAME,NUM_CALLS)
  15. #endif
  16. #endif