7 #ifndef __core_Profiler_h__ 8 #define __core_Profiler_h__ 10 #define FE_PROFILER_ON (FE_CODEGEN<=FE_PROFILE) 11 #define FE_PROFILER_DEBUG FALSE 30 feLog(
"Profiler calibrate %.6G us/tick\n",
43 m_spProfiler(spProfiler),
51 spProfiler->registerProfile(hpProfile);
55 const String& name(
void)
const {
return m_name; }
56 F64 microseconds(
void)
const {
return m_us; }
57 U32 count(
void)
const {
return m_count; }
65 feLog(
"Profile %s start %u\n",m_name.c_str(),
79 unsigned long diff=tick-m_startTick;
81 feLog(
"Profile %s finish %u diff %u\n",
83 tick,tick-m_startTick,us);
96 rspProfile->m_startTick,m_startTick);
100 m_startTick-rspProfile->m_startTick;
102 feLog(
"Profile %s replace %s %u diff %u" 105 rspProfile->name().c_str(),
107 m_startTick-rspProfile->m_startTick,us);
111 String report(
void)
const;
120 unsigned long m_startTick;
129 :m_spProfile(rspProfile)
133 m_spProfile->start();
139 m_spProfile->finish();
149 const String& name(
void)
const {
return m_name; }
153 { m_profileList.append(hpProfile); }
158 #if FE_PROFILER_DEBUG 159 feLog(
"Profiler %s begin\n",m_name.c_str());
164 #if FE_PROFILER_DEBUG 165 feLog(
"Profiler %s end\n",m_name.c_str());
Fully Bidirectional Doubly-Linked List.
Definition: List.h:496
static void FE_CDECL calibrate(void)
Perform a self-contained recalibration.
Definition: SystemTicker.h:192
kernel
Definition: namespace.dox:3
Guard-style scope control for a Profiler.
Definition: Profiler.h:124
Group of tick-based precision profilers.
Definition: Profiler.h:22
static float microsecondsPerTick()
Returns the fractional number of microseonds for each processor clock tick.
Definition: SystemTicker.h:215
Tick-based precision time meter.
Definition: Profiler.h:38
Automatically reference-counted string container.
Definition: String.h:128
static unsigned long tickDifference(unsigned long start, unsigned long finish)
Return the reltive tick change between two absolute tick values.
Definition: SystemTicker.h:203
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
Base class providing an fe::Handle to the derived class.
Definition: Handled.h:209