From 7f9285979d744ee3591f810928e2ab570baba90e Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Thu, 23 Sep 2010 14:59:03 -0400 Subject: WIP make tcmalloc work on linux (JIRA pending) First pass at integrating the linux version of tcmalloc. Code will be reviewed in a later commit before pushing. --- indra/cmake/Copy3rdPartyLibs.cmake | 2 +- indra/cmake/GooglePerfTools.cmake | 5 ++++- indra/newview/viewer_manifest.py | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 9900a8fb45..915f9c183f 100755 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -235,7 +235,7 @@ elseif(LINUX) libopenjpeg.so libssl.so libstacktrace.so - libtcmalloc.so + libtcmalloc_minimal.so libuuid.so.1 libssl.so.0.9.7 ) diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index dc6d013bf2..5581b3b0e3 100755 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -13,7 +13,10 @@ else (STANDALONE) set(GOOGLE_PERFTOOLS_FOUND "YES") endif (WINDOWS) if (LINUX) - set(TCMALLOC_LIBRARIES tcmalloc) + use_prebuilt_binary(tcmalloc) + set(TCMALLOC_LIBRARIES + debug libtcmalloc_minimal_debug + optimized libtcmalloc_minimal) set(STACKTRACE_LIBRARIES stacktrace) set(PROFILER_LIBRARIES profiler) set(GOOGLE_PERFTOOLS_INCLUDE_DIR diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 8296c28e80..9269c4a85b 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -937,6 +937,7 @@ class Linux_i686Manifest(LinuxManifest): self.path("libalut.so") self.path("libopenal.so", "libopenal.so.1") self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname + self.path("libtcmalloc_minimal.so", "libtcmalloc_minimal.so") #formerly called google perf tools try: self.path("libkdu.so") pass -- cgit v1.2.3 From 1ac289bac95db85c90058ed333ff8cb261d93c6f Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Thu, 23 Sep 2010 16:46:02 -0400 Subject: SH-211 FIX update viewer-mesh branch to use new tcmalloc package Finished changes to make viewer-mesh make use of tcmalloc on linux. Almost all changes are juggling cmake config files, to make sure that the package is downloaded, installed, moved at the right times, and linked at the right times. Code reviewed by Seraph --- indra/cmake/Copy3rdPartyLibs.cmake | 1 + indra/cmake/GooglePerfTools.cmake | 4 ++-- indra/newview/CMakeLists.txt | 1 + indra/newview/viewer_manifest.py | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 915f9c183f..923c0e160e 100755 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -236,6 +236,7 @@ elseif(LINUX) libssl.so libstacktrace.so libtcmalloc_minimal.so + libtcmalloc_minimal.so.0 libuuid.so.1 libssl.so.0.9.7 ) diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index 5581b3b0e3..048f5a3235 100755 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -15,8 +15,8 @@ else (STANDALONE) if (LINUX) use_prebuilt_binary(tcmalloc) set(TCMALLOC_LIBRARIES - debug libtcmalloc_minimal_debug - optimized libtcmalloc_minimal) + debug tcmalloc_minimal_debug + optimized tcmalloc_minimal) set(STACKTRACE_LIBRARIES stacktrace) set(PROFILER_LIBRARIES profiler) set(GOOGLE_PERFTOOLS_INCLUDE_DIR diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0f2d461511..e42f9d64c2 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1676,6 +1676,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${CRYPTO_LIBRARIES} ${LLLOGIN_LIBRARIES} ${LLCONVEXDECOMP_LIBRARY} + ${TCMALLOC_LIBRARIES} ) build_version(viewer) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 9269c4a85b..98729986ad 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -938,6 +938,7 @@ class Linux_i686Manifest(LinuxManifest): self.path("libopenal.so", "libopenal.so.1") self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname self.path("libtcmalloc_minimal.so", "libtcmalloc_minimal.so") #formerly called google perf tools + self.path("libtcmalloc_minimal.so.0", "libtcmalloc_minimal.so.0") #formerly called google perf tools try: self.path("libkdu.so") pass -- cgit v1.2.3