From f4540fab4887f6fe54ed6472c4b2458e3ac745d5 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Tue, 26 Apr 2011 17:06:04 -0700 Subject: FIX CHOP-629: Enabled debugging info for llcommon.dll --- indra/llcommon/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llcommon') diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 22e0705036..800bf8eba9 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -268,6 +268,10 @@ if(LLCOMMON_LINK_SHARED) add_definitions(-fPIC) endif(WINDOWS) endif(NOT WORD_SIZE EQUAL 32) + if(WINDOWS) + # always generate llcommon.pdb, even for "Release" builds + set_target_properties(llcommon PROPERTIES LINK_FLAGS "/DEBUG") + endif(WINDOWS) ll_stage_sharedlib(llcommon) else(LLCOMMON_LINK_SHARED) add_library (llcommon ${llcommon_SOURCE_FILES}) -- cgit v1.2.3 From a34cad5f2a95bffa7fda2d67d9c7750de15a93d6 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 4 May 2011 16:13:26 -0700 Subject: EXP-779 FIX -- Help > About Second Life Reports Kernel Version Twice, Instead of OS Version Modified Mac OS_VERSION string to include OS X version number in addition to Kernel version info. DARWIN llcommon build now depends on Carbon in order to provide this functionality. Reviewed by Richard. --- indra/llcommon/CMakeLists.txt | 6 +++++ indra/llcommon/llsys.cpp | 62 ++++++++++++++++++++++++++++++++++++------- 2 files changed, 59 insertions(+), 9 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 22e0705036..d3dca73db4 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -287,6 +287,12 @@ target_link_libraries( ${GOOGLE_PERFTOOLS_LIBRARIES} ) +if (DARWIN) + include(CMakeFindFrameworks) + find_library(CARBON_LIBRARY Carbon) + target_link_libraries(llcommon ${CARBON_LIBRARY}) +endif (DARWIN) + add_dependencies(llcommon stage_third_party_libs) if (LL_TESTS) diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 10cdc7087b..ca2d3f9181 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -46,6 +46,7 @@ # include # include # include +# include #elif LL_LINUX # include # include @@ -318,7 +319,58 @@ LLOSInfo::LLOSInfo() : } mOSString += compatibility_mode; +#elif LL_DARWIN + + // Initialize mOSStringSimple to something like: + // "Mac OS X 10.6.7" + { + const char * DARWIN_PRODUCT_NAME = "Mac OS X"; + + SInt32 major_version, minor_version, bugfix_version; + OSErr r1 = Gestalt(gestaltSystemVersionMajor, &major_version); + OSErr r2 = Gestalt(gestaltSystemVersionMinor, &minor_version); + OSErr r3 = Gestalt(gestaltSystemVersionBugFix, &bugfix_version); + + if((r1 == noErr) && (r2 == noErr) && (r3 == noErr)) + { + mMajorVer = major_version; + mMinorVer = minor_version; + mBuild = bugfix_version; + + std::stringstream os_version_string; + os_version_string << DARWIN_PRODUCT_NAME << " " << mMajorVer << "." << mMinorVer << "." << mBuild; + + // Put it in the OS string we are compiling + mOSStringSimple.append(os_version_string.str()); + } + else + { + mOSStringSimple.append("Unable to collect OS info"); + } + } + + // Initialize mOSString to something like: + // "Mac OS X 10.6.7 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386" + struct utsname un; + if(uname(&un) != -1) + { + mOSString = mOSStringSimple; + mOSString.append(" "); + mOSString.append(un.sysname); + mOSString.append(" "); + mOSString.append(un.release); + mOSString.append(" "); + mOSString.append(un.version); + mOSString.append(" "); + mOSString.append(un.machine); + } + else + { + mOSString = mOSStringSimple; + } + #else + struct utsname un; if(uname(&un) != -1) { @@ -334,15 +386,7 @@ LLOSInfo::LLOSInfo() : // Simplify 'Simple' std::string ostype = mOSStringSimple.substr(0, mOSStringSimple.find_first_of(" ", 0)); - if (ostype == "Darwin") - { - // Only care about major Darwin versions, truncate at first '.' - S32 idx1 = mOSStringSimple.find_first_of(".", 0); - std::string simple = mOSStringSimple.substr(0, idx1); - if (simple.length() > 0) - mOSStringSimple = simple; - } - else if (ostype == "Linux") + if (ostype == "Linux") { // Only care about major and minor Linux versions, truncate at second '.' std::string::size_type idx1 = mOSStringSimple.find_first_of(".", 0); -- cgit v1.2.3 From 343ffb9d512702fff76e542575a0eff79ea62204 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 5 May 2011 19:23:55 -0400 Subject: Remove Pth library from viewer build. This library was only needed on the Mac, and only with the OS X 10.4 SDK. As of October 2010, we no longer build the viewer with that SDK. The 10.5 SDK we're currently using directly supports the functionality for which we originally brought in Pth. --- indra/llcommon/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 800bf8eba9..2963fa15af 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -7,7 +7,6 @@ include(00-Common) include(LLCommon) include(Linking) include(Boost) -include(Pth) include(LLSharedLibs) include(GoogleBreakpad) include(GooglePerfTools) @@ -18,7 +17,6 @@ include_directories( ${EXPAT_INCLUDE_DIRS} ${LLCOMMON_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} - ${PTH_INCLUDE_DIRS} ) # add_executable(lltreeiterators lltreeiterators.cpp) @@ -287,7 +285,6 @@ target_link_libraries( ${WINDOWS_LIBRARIES} ${BOOST_PROGRAM_OPTIONS_LIBRARY} ${BOOST_REGEX_LIBRARY} - ${PTH_LIBRARIES} ${GOOGLE_PERFTOOLS_LIBRARIES} ) -- cgit v1.2.3 From dbc92691a62be9c9cdb764ab6f17510c7c7ba64d Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Thu, 5 May 2011 17:13:52 -0700 Subject: Work in progress on CHOP-609 / CHOP-624 build time improvements. Eliminated a bunch of unnecesary header dependencies. --- indra/llcommon/llapp.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index 39daefd1ad..ed192a9975 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -24,6 +24,10 @@ * $/LicenseInfo$ */ +#include "linden_common.h" + +#include "llapp.h" + #include #ifdef LL_DARWIN @@ -32,9 +36,6 @@ #include #endif -#include "linden_common.h" -#include "llapp.h" - #include "llcommon.h" #include "llapr.h" #include "llerrorcontrol.h" -- cgit v1.2.3 From a5118ccd6721afdf4f8c71cba6007eb7be4d7c19 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 9 May 2011 09:57:02 -0400 Subject: increment viewer version to 2.6.9 --- indra/llcommon/llversionviewer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index 08026c38a6..79124a5a37 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -29,7 +29,7 @@ const S32 LL_VERSION_MAJOR = 2; const S32 LL_VERSION_MINOR = 6; -const S32 LL_VERSION_PATCH = 8; +const S32 LL_VERSION_PATCH = 9; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Developer"; -- cgit v1.2.3 From 2a843e9a6bb5cb70f69794419ab4a7d16ee3c6cb Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Thu, 12 May 2011 16:09:42 -0700 Subject: Fix up alignment problems for debug build. reviewed by davep. --- indra/llcommon/llmemory.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index 0adb78236e..3bd1403576 100644 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -28,7 +28,7 @@ #include "llmemtype.h" -#if 0 //DON'T use ll_aligned_foo now that we use tcmalloc everywhere (tcmalloc aligns automatically at appropriate intervals) +#if LL_DEBUG inline void* ll_aligned_malloc( size_t size, int align ) { void* mem = malloc( size + (align - 1) + sizeof(void*) ); @@ -95,7 +95,15 @@ inline void ll_aligned_free_32(void *p) free(p); // posix_memalign() is compatible with heap deallocator #endif } -#endif +#else // LL_DEBUG +// ll_aligned_foo are noops now that we use tcmalloc everywhere (tcmalloc aligns automatically at appropriate intervals) +#define ll_aligned_malloc( size, align ) malloc(size) +#define ll_aligned_free( ptr ) free(ptr) +#define ll_aligned_malloc_16 malloc +#define ll_aligned_free_16 free +#define ll_aligned_malloc_32 malloc +#define ll_aligned_free_32 free +#endif // LL_DEBUG class LL_COMMON_API LLMemory { -- cgit v1.2.3 From 1f15b3bdae8baab793463c080c90ec7544efd0c3 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 19 May 2011 13:37:42 -0400 Subject: increment viewer version to 2.7.0 --- indra/llcommon/llversionviewer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index 79124a5a37..7703132d90 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -28,8 +28,8 @@ #define LL_LLVERSIONVIEWER_H const S32 LL_VERSION_MAJOR = 2; -const S32 LL_VERSION_MINOR = 6; -const S32 LL_VERSION_PATCH = 9; +const S32 LL_VERSION_MINOR = 7; +const S32 LL_VERSION_PATCH = 0; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Developer"; -- cgit v1.2.3 From 0b612741d53a044a0179e1c32018bf8cd4213631 Mon Sep 17 00:00:00 2001 From: prep linden Date: Fri, 20 May 2011 14:26:05 -0400 Subject: SH-1252 and SH-1253 WIP. --- indra/llcommon/CMakeLists.txt | 1 + indra/llcommon/llaccountingquota.h | 78 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 indra/llcommon/llaccountingquota.h (limited to 'indra/llcommon') diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 80df91a5c1..9910281b64 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -115,6 +115,7 @@ set(llcommon_HEADER_FILES indra_constants.h linden_common.h linked_lists.h + llaccountingquota.h llallocator.h llallocator_heap_profile.h llagentconstants.h diff --git a/indra/llcommon/llaccountingquota.h b/indra/llcommon/llaccountingquota.h new file mode 100644 index 0000000000..f52d94f868 --- /dev/null +++ b/indra/llcommon/llaccountingquota.h @@ -0,0 +1,78 @@ +/** + * @file llaccountingquota.h + * @ + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2009, Linden Research, Inc. + * + * 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. + * $/LicenseInfo$ + */ + +#ifndef LL_ACCOUNTINGQUOTA_H +#define LL_ACCOUNTINGQUOTA_H + +struct ParcelQuota +{ + ParcelQuota( F32 ownerRenderCost, F32 ownerPhysicsCost, F32 ownerNetworkCost, F32 ownerSimulationCost, + F32 groupRenderCost, F32 groupPhysicsCost, F32 groupNetworkCost, F32 groupSimulationCost, + F32 otherRenderCost, F32 otherPhysicsCost, F32 otherNetworkCost, F32 otherSimulationCost, + F32 totalRenderCost, F32 totalPhysicsCost, F32 totalNetworkCost, F32 totalSimulationCost) + : mOwnerRenderCost( ownerRenderCost ), mOwnerPhysicsCost( ownerPhysicsCost ) + , mOwnerNetworkCost( ownerNetworkCost ), mOwnerSimulationCost( ownerSimulationCost ) + , mGroupRenderCost( groupRenderCost ), mGroupPhysicsCost( groupPhysicsCost ) + , mGroupNetworkCost( groupNetworkCost ), mGroupSimulationCost( groupSimulationCost ) + , mOtherRenderCost( otherRenderCost ), mOtherPhysicsCost( otherPhysicsCost ) + , mOtherNetworkCost( otherNetworkCost ), mOtherSimulationCost( otherSimulationCost ) + , mTotalRenderCost( totalRenderCost ), mTotalPhysicsCost( totalPhysicsCost ) + , mTotalNetworkCost( totalNetworkCost ), mTotalSimulationCost( totalSimulationCost ) + { + } + ParcelQuota(){} + F32 mOwnerRenderCost, mOwnerPhysicsCost, mOwnerNetworkCost, mOwnerSimulationCost; + F32 mGroupRenderCost, mGroupPhysicsCost, mGroupNetworkCost, mGroupSimulationCost; + F32 mOtherRenderCost, mOtherPhysicsCost, mOtherNetworkCost, mOtherSimulationCost; + F32 mTotalRenderCost, mTotalPhysicsCost, mTotalNetworkCost, mTotalSimulationCost; +}; + +struct SelectionQuota +{ + SelectionQuota( S32 localId, F32 renderCost, F32 physicsCost, F32 networkCost, F32 simulationCost ) + : mLocalId( localId) + , mRenderCost( renderCost ) + , mPhysicsCost( physicsCost ) + , mNetworkCost( networkCost ) + , mSimulationCost( simulationCost ) + { + } + SelectionQuota() {} + + F32 mRenderCost, mPhysicsCost, mNetworkCost, mSimulationCost; + S32 mLocalId; +}; + +#endif + + + -- cgit v1.2.3