From 7399c39a2fef7ffaa232047bf2ea16ebef682506 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 2 Sep 2010 19:13:48 -0500 Subject: Fix for crash when loading models (Don't hit UI from the main thread). Added asserts to LLFastTimer to verify main thread use only. --- indra/llcommon/llfasttimer_class.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/llcommon/llfasttimer_class.h') diff --git a/indra/llcommon/llfasttimer_class.h b/indra/llcommon/llfasttimer_class.h index ddb1a74793..d348888832 100644 --- a/indra/llcommon/llfasttimer_class.h +++ b/indra/llcommon/llfasttimer_class.h @@ -37,12 +37,17 @@ #define FAST_TIMER_ON 1 #define TIME_FAST_TIMERS 0 +#define DEBUG_FAST_TIMER_THREADS 1 class LLMutex; #include #include "llsd.h" +#if DEBUG_FAST_TIMER_THREADS +void assert_main_thread(); +#endif + class LL_COMMON_API LLFastTimer { public: @@ -181,6 +186,9 @@ public: #if TIME_FAST_TIMERS U64 timer_end = getCPUClockCount64(); sTimerCycles += timer_end - timer_start; +#endif +#if DEBUG_FAST_TIMER_THREADS + assert_main_thread(); #endif } -- cgit v1.2.3 From 413eb8a705f28ad5d9c838ff0ff282a4746b4d7c Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Fri, 3 Sep 2010 16:31:52 -0400 Subject: buildfix: disabling fasttimers assert to unstick the build --- indra/llcommon/llfasttimer_class.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llfasttimer_class.h') diff --git a/indra/llcommon/llfasttimer_class.h b/indra/llcommon/llfasttimer_class.h index d348888832..d3e0656cc2 100644 --- a/indra/llcommon/llfasttimer_class.h +++ b/indra/llcommon/llfasttimer_class.h @@ -37,7 +37,7 @@ #define FAST_TIMER_ON 1 #define TIME_FAST_TIMERS 0 -#define DEBUG_FAST_TIMER_THREADS 1 +#define DEBUG_FAST_TIMER_THREADS 0 class LLMutex; -- cgit v1.2.3 From a5619d16f74863168f45b04b37cc6383e1a92263 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 13 Oct 2010 07:24:37 -0400 Subject: correct licenses (fix problem with license change merge) --- indra/llcommon/llfasttimer_class.h | 42 ++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 24 deletions(-) (limited to 'indra/llcommon/llfasttimer_class.h') diff --git a/indra/llcommon/llfasttimer_class.h b/indra/llcommon/llfasttimer_class.h index d3e0656cc2..8dd686dc38 100644 --- a/indra/llcommon/llfasttimer_class.h +++ b/indra/llcommon/llfasttimer_class.h @@ -2,31 +2,25 @@ * @file llfasttimer_class.h * @brief Declaration of a fast timer. * - * $LicenseInfo:firstyear=2004&license=viewergpl$ - * - * Copyright (c) 2004-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2004&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -- cgit v1.2.3 From 9a8dbb852056834ebdbea23d8475a4ec4b685549 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 17 Dec 2010 14:13:07 -0500 Subject: SH-682 WIP: allow DEBUG_FAST_TIMER_THREADS to work when enabled --- indra/llcommon/llfasttimer_class.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 indra/llcommon/llfasttimer_class.h (limited to 'indra/llcommon/llfasttimer_class.h') diff --git a/indra/llcommon/llfasttimer_class.h b/indra/llcommon/llfasttimer_class.h old mode 100644 new mode 100755 index 2a645315c9..4e59d4ab9d --- a/indra/llcommon/llfasttimer_class.h +++ b/indra/llcommon/llfasttimer_class.h @@ -39,7 +39,7 @@ class LLMutex; #include "llsd.h" #if DEBUG_FAST_TIMER_THREADS -void assert_main_thread(); +LL_COMMON_API void assert_main_thread(); #endif class LL_COMMON_API LLFastTimer -- cgit v1.2.3 From 6a0e8fc13ec246f69e5718ee91a30117ae703c2a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 20 Dec 2010 13:52:48 -0500 Subject: thread safety checking --- indra/llcommon/llfasttimer_class.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/llcommon/llfasttimer_class.h') diff --git a/indra/llcommon/llfasttimer_class.h b/indra/llcommon/llfasttimer_class.h index 4e59d4ab9d..68efb69e87 100755 --- a/indra/llcommon/llfasttimer_class.h +++ b/indra/llcommon/llfasttimer_class.h @@ -38,9 +38,7 @@ class LLMutex; #include #include "llsd.h" -#if DEBUG_FAST_TIMER_THREADS LL_COMMON_API void assert_main_thread(); -#endif class LL_COMMON_API LLFastTimer { -- cgit v1.2.3 From 4bd6edc6b037195012583467a3e5e754f6a5af77 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 20 Dec 2010 17:11:34 -0500 Subject: SH-682 FIX, SH-594 FIX - removed mFMP wrapper, added thread checking. Moved onIdle functions to llcallbacklist. --- indra/llcommon/llfasttimer_class.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llfasttimer_class.h') diff --git a/indra/llcommon/llfasttimer_class.h b/indra/llcommon/llfasttimer_class.h index 68efb69e87..038a2d246a 100755 --- a/indra/llcommon/llfasttimer_class.h +++ b/indra/llcommon/llfasttimer_class.h @@ -31,7 +31,7 @@ #define FAST_TIMER_ON 1 #define TIME_FAST_TIMERS 0 -#define DEBUG_FAST_TIMER_THREADS 0 +#define DEBUG_FAST_TIMER_THREADS 1 class LLMutex; -- cgit v1.2.3 From 28b628ab7b92243a6e40fcdf87f4e2c5b44150e7 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 29 Dec 2010 10:03:33 -0500 Subject: allow run-time query of which timer function is being used --- indra/llcommon/llfasttimer_class.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llcommon/llfasttimer_class.h') diff --git a/indra/llcommon/llfasttimer_class.h b/indra/llcommon/llfasttimer_class.h index 038a2d246a..827747f0c6 100755 --- a/indra/llcommon/llfasttimer_class.h +++ b/indra/llcommon/llfasttimer_class.h @@ -180,7 +180,9 @@ public: sTimerCycles += timer_end - timer_start; #endif #if DEBUG_FAST_TIMER_THREADS +#if !LL_RELEASE assert_main_thread(); +#endif #endif } @@ -251,6 +253,7 @@ public: U32 mChildTime; }; static CurTimerData sCurTimerData; + static std::string sClockType; private: static U32 getCPUClockCount32(); -- cgit v1.2.3