SDEngine
Game Engine
Loading...
Searching...
No Matches
profiler.hpp File Reference
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string_view>
#include <x86intrin.h>
#include "core/logging.hpp"
#include "core/types.hpp"
+ Include dependency graph for profiler.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sd::Profile
 

Namespaces

namespace  sd
 
namespace  sd::detail
 

Macros

#define SD_CONCAT_INNER(a, b)   a##b
 
#define SD_CONCAT(a, b)   SD_CONCAT_INNER(a, b)
 
#define PROFILE(name)
 
#define PROFILE_FUNCTION()   PROFILE(__func__)
 
#define PROFILE_START(name)   ::sd::_sd_active_profile.begin(name)
 
#define PROFILE_END()   ::sd::_sd_active_profile.end()
 

Functions

U64 sd::detail::get_cpu_mhz ()
 

Variables

thread_local Profile sd::_sd_active_profile {}
 

Macro Definition Documentation

◆ PROFILE

#define PROFILE (   name)
Value:
name \
}
#define SD_CONCAT(a, b)
Definition profiler.hpp:97
Definition profiler.hpp:35
consteval U64 type_id_of()
Definition type_id.hpp:6

◆ PROFILE_END

#define PROFILE_END ( )    ::sd::_sd_active_profile.end()

◆ PROFILE_FUNCTION

#define PROFILE_FUNCTION ( )    PROFILE(__func__)

◆ PROFILE_START

#define PROFILE_START (   name)    ::sd::_sd_active_profile.begin(name)

◆ SD_CONCAT

#define SD_CONCAT (   a,
  b 
)    SD_CONCAT_INNER(a, b)

◆ SD_CONCAT_INNER

#define SD_CONCAT_INNER (   a,
  b 
)    a##b