diff options
| author | leyla_linden <none@none> | 2011-01-06 16:43:57 -0800 |
|---|---|---|
| committer | leyla_linden <none@none> | 2011-01-06 16:43:57 -0800 |
| commit | 523722652259d37841be2ad4ad283df4887ad372 (patch) | |
| tree | 3872f4235183254667bb0452ff5faf6554c7c69c /indra/llcommon/llfasttimer_class.cpp | |
| parent | f243f7e550b9dadd26d119bfeb4b215aa809997c (diff) | |
| parent | d8cf705d0189ec34b1202ee50ea3e5991cf4c90f (diff) | |
Merge
Diffstat (limited to 'indra/llcommon/llfasttimer_class.cpp')
| -rw-r--r-- | indra/llcommon/llfasttimer_class.cpp | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/indra/llcommon/llfasttimer_class.cpp b/indra/llcommon/llfasttimer_class.cpp index 0828635881..bd594b06cf 100644 --- a/indra/llcommon/llfasttimer_class.cpp +++ b/indra/llcommon/llfasttimer_class.cpp @@ -860,6 +860,9 @@ U64 LLFastTimer::getCPUClockCount64() } return ret_val; } + +std::string LLFastTimer::sClockType = "rdtsc"; + #else //LL_COMMON_API U64 get_clock_count(); // in lltimer.cpp // These use QueryPerformanceCounter, which is arguably fine and also works on amd architectures. @@ -872,6 +875,8 @@ U64 LLFastTimer::getCPUClockCount64() { return get_clock_count(); } + +std::string LLFastTimer::sClockType = "QueryPerformanceCounter"; #endif #endif @@ -904,6 +909,9 @@ U32 LLFastTimer::getCPUClockCount32() { return (U32)(LLFastTimer::getCPUClockCount64() >> 8); } + +std::string LLFastTimer::sClockType = "clock_gettime"; + #endif // (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__)) @@ -923,23 +931,7 @@ U64 LLFastTimer::getCPUClockCount64() __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); return x; } -#endif - - -#if ( LL_DARWIN && !(defined(__i386__) || defined(__amd64__))) -// -// Mac PPC (deprecated) implementation of CPU clock -// -// Just use gettimeofday implementation for now -U32 LLFastTimer::getCPUClockCount32() -{ - return (U32)(get_clock_count()>>8); -} - -U64 LLFastTimer::getCPUClockCount64() -{ - return get_clock_count(); -} +std::string LLFastTimer::sClockType = "rdtsc"; #endif |
