From 2f4a3197bfdb5200d4472343b729fe7ff7eb9225 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 3 Dec 2010 15:40:42 -0500
Subject: [PATCH] Added timer-related logging during logperformance

---
 indra/llcommon/llfasttimer_class.cpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 mode change 100644 => 100755 indra/llcommon/llfasttimer_class.cpp

diff --git a/indra/llcommon/llfasttimer_class.cpp b/indra/llcommon/llfasttimer_class.cpp
old mode 100644
new mode 100755
index c084166ccce..08286358815
--- a/indra/llcommon/llfasttimer_class.cpp
+++ b/indra/llcommon/llfasttimer_class.cpp
@@ -501,6 +501,18 @@ void LLFastTimer::NamedTimer::resetFrame()
 	if (sLog)
 	{ //output current frame counts to performance log
 
+		static S32 call_count = 0;
+		if (call_count % 100 == 0)
+		{
+			llinfos << "countsPerSecond (32 bit): " << countsPerSecond() << llendl;
+			llinfos << "get_clock_count (64 bit): " << get_clock_count() << llendl;
+			llinfos << "LLProcessorInfo().getCPUFrequency() " << LLProcessorInfo().getCPUFrequency() << llendl;
+			llinfos << "getCPUClockCount32() " << getCPUClockCount32() << llendl;
+			llinfos << "getCPUClockCount64() " << getCPUClockCount64() << llendl;
+			llinfos << "elapsed sec " << ((F64)getCPUClockCount64())/((F64)LLProcessorInfo().getCPUFrequency()*1000000.0) << llendl;
+		}
+		call_count++;
+
 		F64 iclock_freq = 1000.0 / countsPerSecond(); // good place to calculate clock frequency
 
 		F64 total_time = 0;
-- 
GitLab