From 037593aa994b3dc96166a12bb6581acd2876b72c Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Fri, 31 Dec 2010 06:13:14 +0100 Subject: [PATCH] Google tcmalloc --- indra/cmake/GooglePerfTools.cmake | 16 +++++++++++----- indra/newview/CMakeLists.txt | 5 +++-- indra/newview/viewer_manifest.py | 4 +++- install.xml | 7 +++++++ 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index 49f352092..42524ed0a 100644 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -4,13 +4,12 @@ include(Prebuilt) if (STANDALONE) include(FindGooglePerfTools) else (STANDALONE) - if (LINUX) + if (LINUX OR WINDOWS) use_prebuilt_binary(google) - endif (LINUX) + endif (LINUX OR WINDOWS) if (WINDOWS) set(TCMALLOC_LIBRARIES - debug libtcmalloc_minimal-debug - optimized libtcmalloc_minimal-debug) + libtcmalloc_minimal) endif (WINDOWS) if (LINUX) set(TCMALLOC_LIBRARIES tcmalloc) @@ -28,7 +27,7 @@ endif (GOOGLE_PERFTOOLS_FOUND) # XXX Disable temporarily, until we have compilation issues on 64-bit # Etch sorted. -set(USE_GOOGLE_PERFTOOLS OFF) +#set(USE_GOOGLE_PERFTOOLS OFF) if (USE_GOOGLE_PERFTOOLS) set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1) @@ -37,3 +36,10 @@ if (USE_GOOGLE_PERFTOOLS) else (USE_GOOGLE_PERFTOOLS) set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) endif (USE_GOOGLE_PERFTOOLS) + +if (NOT(DISABLE_TCMALLOC OR USE_GOOGLE_PERFTOOLS)) + set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1_) + include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR}) + set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES}) +endif() + diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 5d38149f8..7d43dd3e9 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -512,7 +512,7 @@ set(viewer_SOURCE_FILES set(VIEWER_BINARY_NAME "secondlife-bin" CACHE STRING "The name of the viewer executable to create.") -if (LINUX) +if ((LINUX OR DARWIN) AND NOT DARWIN_PPC) # We can't set these flags for Darwin, because they get passed to # the PPC compiler. Ugh. @@ -524,7 +524,7 @@ if (LINUX) llviewerjointmesh_sse2.cpp PROPERTIES COMPILE_FLAGS "-msse2 -mfpmath=sse" ) -endif (LINUX) +endif ((LINUX OR DARWIN) AND NOT DARWIN_PPC) set(viewer_HEADER_FILES CMakeLists.txt @@ -1384,6 +1384,7 @@ if (WINDOWS) endif (WINDOWS) target_link_libraries(${VIEWER_BINARY_NAME} + ${GOOGLE_PERFTOOLS_LIBRARIES} ${LLAUDIO_LIBRARIES} ${LLCHARACTER_LIBRARIES} ${LLIMAGE_LIBRARIES} diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 30f214f6c..a9d19374e 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -268,6 +268,8 @@ class WindowsManifest(ViewerManifest): pass self.end_prefix() + self.path(src="../../libraries/i686-win32/lib/release/libtcmalloc_minimal.dll") + # These need to be installed as a SxS assembly, currently a 'private' assembly. # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx #~ if self.prefix(src=self.args['configuration'], dst=""): @@ -758,7 +760,7 @@ class Linux_i686Manifest(LinuxManifest): self.path("libuuid.so.1") self.path("libSDL-1.2.so.0") self.path("libELFIO.so") - self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3") + #self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3") self.path("libalut.so") self.path("libopenal.so", "libopenal.so.1") self.end_prefix("lib") diff --git a/install.xml b/install.xml index d0315a2bb..a516e6e8a 100644 --- a/install.xml +++ b/install.xml @@ -569,6 +569,13 @@ url http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/google-linux-20080812.tar.bz2 + windows + + md5sum + b46525d8eae16865c27905a844c86ac0 + url + http://github.com/downloads/siana/SingularityViewer/tcmalloc_win_101223.tar.bz2 + gstreamer