summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2024-08-13 16:28:23 -0400
committerRye Mutt <rye@alchemyviewer.org>2024-08-13 17:27:30 -0400
commit183b097072015fe83c751904d8133fa105717a5b (patch)
tree7b5030712ec8bee902b2a852976012428b10cc26 /indra/llcommon
parent2921deed78af5751b3788aa8d8e1297306b2abab (diff)
Update tracy integration to 0.11 and rework client library to be configurable at build time
Also copy tracy profiler client next to windows binary when enabled
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/CMakeLists.txt4
-rw-r--r--indra/llcommon/llprofiler.cpp30
-rw-r--r--indra/llcommon/llprofiler.h6
3 files changed, 34 insertions, 6 deletions
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 8e43627a5f..165bfd52d5 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -267,6 +267,10 @@ if (DARWIN)
list(APPEND llcommon_SOURCE_FILES llsys_objc.mm)
endif (DARWIN)
+if (USE_TRACY)
+ list(APPEND llcommon_SOURCE_FILES llprofiler.cpp)
+endif ()
+
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
add_library (llcommon ${llcommon_SOURCE_FILES})
diff --git a/indra/llcommon/llprofiler.cpp b/indra/llcommon/llprofiler.cpp
new file mode 100644
index 0000000000..bdddabf977
--- /dev/null
+++ b/indra/llcommon/llprofiler.cpp
@@ -0,0 +1,30 @@
+/**
+* @file llprofiler.cpp
+* @brief Implementation of llprofiler
+* @author Rye Cogtail
+*
+* $LicenseInfo:firstyear=2024&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2024, 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$
+*/
+
+#include "linden_common.h"
+
+#include "TracyClient.cpp"
diff --git a/indra/llcommon/llprofiler.h b/indra/llcommon/llprofiler.h
index 732436cc4f..b7d0522336 100644
--- a/indra/llcommon/llprofiler.h
+++ b/indra/llcommon/llprofiler.h
@@ -78,12 +78,6 @@ extern thread_local bool gProfilerEnabled;
#if defined(LL_PROFILER_CONFIGURATION) && (LL_PROFILER_CONFIGURATION > LL_PROFILER_CONFIG_NONE)
#if LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_TRACY || LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_TRACY_FAST_TIMER
- #define TRACY_ENABLE 1
-// Normally these would be enabled but we want to be able to build any viewer with Tracy enabled and run the Tracy server on another machine
-// They must be undefined in order to work across multiple machines
-// #define TRACY_NO_BROADCAST 1
-// #define TRACY_ONLY_LOCALHOST 1
- #define TRACY_ONLY_IPV4 1
#include "tracy/Tracy.hpp"
// Enable OpenGL profiling