18 #ifndef KRADIO_DEBUG_PROFILER_H 19 #define KRADIO_DEBUG_PROFILER_H 25 #include <QtCore/QString> 26 #include <QtCore/QMap> 27 #include <kdemacros.h> 29 #if (defined __i386__) || (defined __x86_64__) 30 static __inline__
unsigned long long int rdtsc()
33 asm volatile(
"rdtsc" :
"=a" (a),
"=d" (d));
34 return ((
unsigned long long)a) | (((
unsigned long long)d) << 32);
37 static __inline__
unsigned long long int rdtsc()
49 void startProfile(
const QString &descr);
50 void stopProfile (
const QString &descr);
56 virtual long long getCounter()
const = 0;
58 void stopInternalCounter();
59 void startInternalCounter();
67 startCounter(start), accumulatedCounter(0), callCounter(0),
68 minCounter(0x7FFFFFFFFFFFFFFFll), maxCounter(0) {}
90 long long getCounter()
const;
KDE_EXPORT MemProfiler global_mem_profiler
long long m_internalCounter
long long getCounter() const
KDE_EXPORT TimeProfiler global_time_profiler
long long accumulatedCounter
static __inline__ unsigned long long int rdtsc()
profile_data(long long start=0)
QMap< QString, profile_data > m_ProfileData