49 if (!sOutOfSamplesReported)
51 Trace(
"ProfileMeasurement: Too many samples, some data will be lost!");
52 sOutOfSamplesReported =
true;
60 if (mSample !=
nullptr)
66 static_assert(
sizeof(
ProfileSample) == 32,
"Assume 32 bytes");
67 static_assert(
alignof(
ProfileSample) == 16,
"Assume 16 byte alignment");
68 #if defined(JPH_USE_SSE)
75 #elif defined(JPH_USE_NEON)
76 const int *
src =
reinterpret_cast<const int *
>(&mTemp);
77 int *
dst =
reinterpret_cast<int *
>(mSample);
#define JPH_NAMESPACE_END
Definition Core.h:367
std::uint32_t uint32
Definition Core.h:442
#define JPH_NAMESPACE_BEGIN
Definition Core.h:361
TraceFunction Trace
Definition IssueReporting.cpp:18
AllocateFunction Allocate
Definition Memory.cpp:59
JPH_NAMESPACE_BEGIN JPH_INLINE uint64 GetProcessorTickCount()
Functionality to get the processors cycle counter.
Definition TickCounter.h:26
ProfileMeasurement(const char *inName, uint32 inColor=0)
Constructor.
Definition Profiler.inl:26
~ProfileMeasurement()
Definition Profiler.inl:58
Definition Profiler.h:170
uint32 mColor
Color to use for this sample.
Definition Profiler.h:175
uint64 mEndCycle
Cycle counter at end of measurement.
Definition Profiler.h:179
JPH_OVERRIDE_NEW_DELETE const char * mName
User defined name of this item.
Definition Profiler.h:174
uint64 mStartCycle
Cycle counter at start of measurement.
Definition Profiler.h:178
Collects all samples of a single thread.
Definition Profiler.h:184
~ProfileThread()
Definition Profiler.inl:17
JPH_OVERRIDE_NEW_DELETE ProfileThread(const string_view &inThreadName)
Constructor.
Definition Profiler.inl:11
static ProfileThread * sGetInstance()
Definition Profiler.h:203
static const uint cMaxSamples
Definition Profiler.h:192
void RemoveThread(ProfileThread *inThread)
Remove a thread from being instrumented.
Definition Profiler.cpp:87
void AddThread(ProfileThread *inThread)
Add a thread to be instrumented.
Definition Profiler.cpp:80
static Profiler * sInstance
Singleton instance.
Definition Profiler.h:100