diff --git a/doc/contributions.txt b/doc/contributions.txt
index ca516f0fce..348c0925f7 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -273,6 +273,7 @@ Beq Janus
SL-14766
SL-14927
SL-15709
+ SL-16027
Beth Walcher
Bezilon Kasei
Biancaluce Robbiani
diff --git a/indra/llcommon/fstracyclient.cpp b/indra/llcommon/fstracyclient.cpp
deleted file mode 100644
index f21c8fd197..0000000000
--- a/indra/llcommon/fstracyclient.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// Tracy profiler
-// ----------------
-//
-// For fast integration, compile and
-// link with this source file (and none
-// other) in your executable (or in the
-// main DLL / shared object on multi-DLL
-// projects).
-//
-
-// Define TRACY_ENABLE to enable profiler.
-#include "common/TracySystem.cpp"
-
-#ifdef TRACY_ENABLE
-
-#ifdef LL_WINDOWS
-# pragma warning(push, 0)
-#endif
-
-#include "common/tracy_lz4.cpp"
-#include "client/TracyProfiler.cpp"
-#include "client/TracyCallstack.cpp"
-#include "client/TracySysTime.cpp"
-
-#include "client/TracySysTrace.cpp"
-
-#include "common/TracySocket.cpp"
-#include "client/tracy_rpmalloc.cpp"
-#include "client/TracyDxt1.cpp"
-
-#if TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 3 || TRACY_HAS_CALLSTACK == 4 || TRACY_HAS_CALLSTACK == 6
-# include "libbacktrace/alloc.cpp"
-# include "libbacktrace/dwarf.cpp"
-# include "libbacktrace/fileline.cpp"
-# include "libbacktrace/mmapio.cpp"
-# include "libbacktrace/posix.cpp"
-# include "libbacktrace/sort.cpp"
-# include "libbacktrace/state.cpp"
-# if TRACY_HAS_CALLSTACK == 4
-# include "libbacktrace/macho.cpp"
-# else
-# include "libbacktrace/elf.cpp"
-# endif
-#endif
-
-#ifdef LL_WINDOWS
-# pragma comment(lib, "ws2_32.lib")
-# pragma comment(lib, "dbghelp.lib")
-# pragma warning(pop)
-#endif
-
-#endif
\ No newline at end of file
diff --git a/indra/llcommon/linden_common.h b/indra/llcommon/linden_common.h
index 71760baee2..bb7fd9a868 100644
--- a/indra/llcommon/linden_common.h
+++ b/indra/llcommon/linden_common.h
@@ -28,8 +28,7 @@
#define LL_LINDEN_COMMON_H
#include "llprofiler.h"
-// #if TRACY_ENABLE && !defined(LL_PROFILER_ENABLE_TRACY_OPENGL) // hooks for memory profiling
-#if TRACY_ENABLE && LL_PROFILER_ENABLE_TRACY_MEMORY // hooks for memory profiling
+#if TRACY_ENABLE // hooks for memory profiling
void *tracy_aligned_malloc(size_t size, size_t alignment);
void tracy_aligned_free(void *memblock);
#define _aligned_malloc(X, Y) tracy_aligned_malloc((X), (Y))
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index c98c159f81..a555f1cbeb 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -114,7 +114,7 @@ template T* LL_NEXT_ALIGNED_ADDRESS_64(T* address)
inline void* ll_aligned_malloc_fallback( size_t size, int align )
{
#if defined(LL_WINDOWS)
- return (_aligned_malloc)(size, align); // reinstate parens to avoid the recursive #define (not nice)
+ return (_aligned_malloc)(size, align);
#else
char* aligned = NULL;
void* mem = malloc( size + (align - 1) + sizeof(void*) );
@@ -132,7 +132,7 @@ template T* LL_NEXT_ALIGNED_ADDRESS_64(T* address)
inline void ll_aligned_free_fallback( void* ptr )
{
#if defined(LL_WINDOWS)
- (_aligned_free)(ptr); // reinstate parens to avoid the recursive #define (not nice)
+ (_aligned_free)(ptr);
#else
if (ptr)
{
diff --git a/indra/llcommon/llprofiler.h b/indra/llcommon/llprofiler.h
index a278c70fe4..cac32e6bed 100644
--- a/indra/llcommon/llprofiler.h
+++ b/indra/llcommon/llprofiler.h
@@ -99,11 +99,8 @@ namespace LLProfiler
#define LL_RECORD_BLOCK_TIME(name) const LLTrace::BlockTimer& LL_GLUE_TOKENS(block_time_recorder, __LINE__)(LLTrace::timeThisBlock(name)); (void)LL_GLUE_TOKENS(block_time_recorder, __LINE__);
#define LL_PROFILE_ZONE_NAMED(name) // LL_PROFILE_ZONE_NAMED is a no-op when Tracy is disabled
+ #define LL_PROFILE_ZONE_NAMED_COLOR(name,color) // LL_RECORD_BLOCK_TIME(name)
#define LL_PROFILE_ZONE_SCOPED // LL_PROFILE_ZONE_SCOPED is a no-op when Tracy is disabled
- // Fix mismatch across ifdef
- // #define LL_PROFILE_ZONE_COLOR(name,color)
- #define LL_PROFILE_ZONE_COLOR(color)
- //
#define LL_PROFILE_ZONE_NUM( val ) (void)( val ); // Not supported
#define LL_PROFILE_ZONE_TEXT( text, size ) (void)( text ); void( size ); // Not supported
@@ -112,10 +109,10 @@ namespace LLProfiler
#define LL_PROFILE_ZONE_INFO(name) (void)(name); // Not supported
#define LL_PROFILE_ZONE_WARN(name) (void)(name); // Not supported
// Additional FS Tracy macros
- #define LL_PROFILE_ZONE_NAMED_COLOR(name,color)
- #define LL_PROFILE_PLOT( name, value )
- #define LL_PROFILE_PLOT_SQ( name, prev, value )
- #define LL_PROFILE_IS_CONNECTED
+ #define LL_PROFILE_ZONE_COLOR(color)
+ #define LL_PROFILE_PLOT( name, value )
+ #define LL_PROFILE_PLOT_SQ( name, prev, value )
+ #define LL_PROFILE_IS_CONNECTED
//
#endif
#if LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_TRACY_FAST_TIMER
@@ -143,7 +140,7 @@ namespace LLProfiler
#define LL_PROFILE_ZONE_ERR(name) LL_PROFILE_ZONE_NAMED_COLOR( name, 0XFF0000 ) // RGB yellow
#define LL_PROFILE_ZONE_INFO(name) LL_PROFILE_ZONE_NAMED_COLOR( name, 0X00FFFF ) // RGB cyan
#define LL_PROFILE_ZONE_WARN(name) LL_PROFILE_ZONE_NAMED_COLOR( name, 0x0FFFF00 ) // RGB red
- // Additional FS Tracy macros
+ // Additional FS Tracy macros
#define LL_PROFILE_ZONE_COLOR(color) ZoneNamedC( ___tracy_scoped_zone, color, LLProfiler::active )
#define LL_PROFILE_PLOT( name, value ) TracyPlot( name, value)
#define LL_PROFILE_PLOT_SQ( name, prev, value ) TracyPlot( name, prev );TracyPlot( name, value )
@@ -152,7 +149,28 @@ namespace LLProfiler
#endif
#else
#define LL_PROFILER_FRAME_END
- #define LL_PROFILER_SET_THREAD_NAME( name ) (void)(name)
+ #define LL_PROFILER_SET_THREAD_NAME(name)
+ #define LL_PROFILER_THREAD_BEGIN(name)
+ #define LL_PROFILER_THREAD_END(name)
+
+ #define LL_RECORD_BLOCK_TIME(name)
+ #define LL_PROFILE_ZONE_NAMED(name)
+ #define LL_PROFILE_ZONE_NAMED_COLOR(name,color)
+ #define LL_PROFILE_ZONE_SCOPED
+
+ #define LL_PROFILE_ZONE_NUM(val)
+ #define LL_PROFILE_ZONE_TEXT(text, size)
+
+ #define LL_PROFILE_ZONE_ERR(name)
+ #define LL_PROFILE_ZONE_INFO(name)
+ #define LL_PROFILE_ZONE_WARN(name)
+
+ // Additional FS Tracy macros
+ #define LL_PROFILE_ZONE_COLOR(color)
+ #define LL_PROFILE_PLOT( name, value )
+ #define LL_PROFILE_PLOT_SQ( name, prev, value )
+ #define LL_PROFILE_IS_CONNECTED
+ //
#endif // LL_PROFILER
#endif // LL_PROFILER_H
diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp
index be44103c11..fd8ad73630 100644
--- a/indra/llimage/llimageworker.cpp
+++ b/indra/llimage/llimageworker.cpp
@@ -25,7 +25,6 @@
*/
#include "linden_common.h"
-#include "fstelemetry.h" // add telemetry support.
#include "llimageworker.h"
#include "llimagedxt.h"
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index f6a6099c77..01ac0ef29c 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1751,8 +1751,6 @@ const S32 max_format = (S32)num_formats - 1;
return FALSE;
}
- // LL_PROFILER_GPU_CONTEXT // Move this the other side of the init
-
if (!gGLManager.initGL())
{
close();
@@ -1760,7 +1758,7 @@ const S32 max_format = (S32)num_formats - 1;
return FALSE;
}
- LL_PROFILER_GPU_CONTEXT // Tracy context now after the init
+ LL_PROFILER_GPU_CONTEXT
// Disable vertical sync for swap
if (disable_vsync && wglSwapIntervalEXT)
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index b42248db03..2dfd58dd07 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1051,8 +1051,6 @@ bool LLAppViewer::init()
LLNotifications::instance();
LL_INFOS("InitInfo") << "Notifications initialized." << LL_ENDL ;
- writeSystemInfo();
-
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
@@ -1178,6 +1176,9 @@ bool LLAppViewer::init()
initWindow();
LL_INFOS("InitInfo") << "Window is initialized." << LL_ENDL ;
+ // writeSystemInfo can be called after window is initialized (gViewerWindow non-null)
+ writeSystemInfo();
+
// initWindow also initializes the Feature List, so now we can initialize this global.
LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap");
@@ -4327,16 +4328,15 @@ void LLAppViewer::writeSystemInfo()
gDebugInfo["FirstLogin"] = LLSD::Boolean(gAgent.isFirstLogin());
gDebugInfo["FirstRunThisInstall"] = gSavedSettings.getBOOL("FirstRunThisInstall");
gDebugInfo["StartupState"] = LLStartUp::getStartupStateString();
-
- // FIRE-31153, do not use gViewerWindow->getWindow which equals nullptr at this point
- //std::vector resolutions = gViewerWindow->getWindow()->getDisplaysResolutionList();
- std::vector resolutions = LLWindow::getDisplaysResolutionList();
- //
-
- for (auto res_iter : resolutions)
- {
- gDebugInfo["DisplayInfo"].append(res_iter);
- }
+
+ if (gViewerWindow)
+ {
+ std::vector resolutions = gViewerWindow->getWindow()->getDisplaysResolutionList();
+ for (auto res_iter : resolutions)
+ {
+ gDebugInfo["DisplayInfo"].append(res_iter);
+ }
+ }
writeDebugInfo(); // Save out debug_info.log early, in case of crash.
}