diff --git a/autobuild.xml b/autobuild.xml
index 6506988d77..c8a33d142f 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -2817,51 +2817,37 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors
diff --git a/indra/cmake/Tracy.cmake b/indra/cmake/Tracy.cmake
index 00b4844fca..5092e050f9 100644
--- a/indra/cmake/Tracy.cmake
+++ b/indra/cmake/Tracy.cmake
@@ -10,7 +10,7 @@ if (USE_TRACY)
use_prebuilt_binary(tracy)
target_include_directories( ll::tracy SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/tracy)
- target_link_libraries( ll::tracy INTERFACE TracyClient )
+ # target_link_libraries( ll::tracy INTERFACE TracyClient )
# See: indra/llcommon/llprofiler.h
add_compile_definitions(LL_PROFILER_CONFIGURATION=3)
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 43946ba62c..8c861f5faa 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -268,8 +268,12 @@ if (DARWIN)
list(APPEND llcommon_SOURCE_FILES llsys_objc.mm)
endif (DARWIN)
-# Tracy Profiler support
+# Tracy Profiler support
list(APPEND llcommon_SOURCE_FILES llprofiler.cpp)
+if (USE_TRACY)
+list(APPEND llcommon_SOURCE_FILES fstracyclient.cpp)
+endif()
+#
# Add all nd* files. memory pool, intrinsics, ...
diff --git a/indra/llcommon/fstracyclient.cpp b/indra/llcommon/fstracyclient.cpp
new file mode 100644
index 0000000000..c367657804
--- /dev/null
+++ b/indra/llcommon/fstracyclient.cpp
@@ -0,0 +1,8 @@
+// Just a simple wrapper to easily import the single tracy source file and save
+// all the pain of cross platform libraries in the Tracy 3p build.
+#include "linden_common.h"
+
+#if LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_TRACY || LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_TRACY_FAST_TIMER
+ #include "TracyClient.cpp"
+#endif // LL_PROFILER_CONFIGURATION
+
diff --git a/indra/llcommon/llprofiler.h b/indra/llcommon/llprofiler.h
index 428702e0e7..11721aa62e 100644
--- a/indra/llcommon/llprofiler.h
+++ b/indra/llcommon/llprofiler.h
@@ -91,12 +91,12 @@ namespace LLProfiler
// #define TRACY_NO_BROADCAST 1
// #define TRACY_ONLY_LOCALHOST 1
#define TRACY_ONLY_IPV4 1
- #include "Tracy.hpp"
+ #include "tracy/Tracy.hpp"
// Fixed mutual exclusion issues with RAM and GPU. NOTE: This might still break on Apple in which case we'll need to restrict that platform
//// GPU Mutually exclusive with detailed memory tracing
// #define LL_PROFILER_ENABLE_TRACY_OPENGL 0
#define LL_PROFILER_ENABLE_TRACY_MEMORY 0
- #define LL_PROFILER_ENABLE_TRACY_OPENGL 0
+ #define LL_PROFILER_ENABLE_TRACY_OPENGL 1
// Enable RenderDoc labeling
#define LL_PROFILER_ENABLE_RENDER_DOC 0
@@ -104,37 +104,37 @@ namespace LLProfiler
#endif
#if LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_TRACY
- #define LL_PROFILER_FRAME_END FrameMark
+ #define LL_PROFILER_FRAME_END FrameMark;
// Note: this threadlocal forces memory colelction enabled from the start. It conflicts with deferred profiling.
#define LL_PROFILER_SET_THREAD_NAME( name ) tracy::SetThreadName( name ); gProfilerEnabled = true;
//
- #define LL_PROFILER_THREAD_BEGIN(name) FrameMarkStart( name ) // C string
- #define LL_PROFILER_THREAD_END(name) FrameMarkEnd( name ) // C string
+ #define LL_PROFILER_THREAD_BEGIN(name) FrameMarkStart( name ); // C string
+ #define LL_PROFILER_THREAD_END(name) FrameMarkEnd( name ); // C string
// revert change that obscures custom FTM zones. We may want to may FTM Zones unique in future.
// #define LL_RECORD_BLOCK_TIME(name) ZoneScoped // Want descriptive names; was: ZoneNamedN( ___tracy_scoped_zone, #name, LLProfiler::active );
- #define LL_RECORD_BLOCK_TIME(name) ZoneNamedN( ___tracy_scoped_zone, #name, LLProfiler::active )
+ #define LL_RECORD_BLOCK_TIME(name) ZoneNamedN( ___tracy_scoped_zone, #name, LLProfiler::active );
//
//
// #define LL_PROFILE_ZONE_NAMED(name) ZoneNamedN( ___tracy_scoped_zone, name, true )
// #define LL_PROFILE_ZONE_NAMED_COLOR(name,color) ZoneNamedNC( ___tracy_scopped_zone, name, color, true ) // RGB
// #define LL_PROFILE_ZONE_SCOPED ZoneScoped
- #define LL_PROFILE_ZONE_NAMED(name) ZoneNamedN( ___tracy_scoped_zone, name, LLProfiler::active )
- #define LL_PROFILE_ZONE_NAMED_COLOR(name,color) ZoneNamedNC( ___tracy_scopped_zone, name, color, LLProfiler::active ) // RGB
- #define LL_PROFILE_ZONE_SCOPED ZoneNamed( ___tracy_scoped_zone, LLProfiler::active ) // Enable deferred collection through filters
+ #define LL_PROFILE_ZONE_NAMED(name) ZoneNamedN( ___tracy_scoped_zone, name, LLProfiler::active );
+ #define LL_PROFILE_ZONE_NAMED_COLOR(name,color) ZoneNamedNC( ___tracy_scopped_zone, name, color, LLProfiler::active ); // RGB
+ #define LL_PROFILE_ZONE_SCOPED ZoneNamed( ___tracy_scoped_zone, LLProfiler::active ); // Enable deferred collection through filters
//
- #define LL_PROFILE_ZONE_NUM( val ) ZoneValue( val )
- #define LL_PROFILE_ZONE_TEXT( text, size ) ZoneText( text, size )
+ #define LL_PROFILE_ZONE_NUM( val ) ZoneValue( val );
+ #define LL_PROFILE_ZONE_TEXT( text, size ) ZoneText( text, size );
#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
- #define LL_PROFILE_ZONE_COLOR(color) ZoneNamedC( ___tracy_scoped_zone, color, LLProfiler::active ) // Additional Tracy macro
- #define LL_PROFILE_PLOT( name, value ) TracyPlot( name, value)
- #define LL_PROFILE_PLOT_SQ( name, prev, value ) TracyPlot(name,prev);TracyPlot( name, value)
+ #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_CONFIG_SQUARE(name) TracyPlotConfig(name, tracy::PlotFormatType::Number, true, false, 0);
#define LL_PROFILE_IS_CONNECTED TracyIsConnected
//
#endif
@@ -158,15 +158,15 @@ namespace LLProfiler
// 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_PLOT_CONFIG_SQUARE(name)
#define LL_PROFILE_IS_CONNECTED
//
#endif
#if LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_TRACY_FAST_TIMER
- #define LL_PROFILER_FRAME_END FrameMark
+ #define LL_PROFILER_FRAME_END FrameMark;
#define LL_PROFILER_SET_THREAD_NAME( name ) tracy::SetThreadName( name ); gProfilerEnabled = true;
- #define LL_PROFILER_THREAD_BEGIN(name) FrameMarkStart( name ) // C string
- #define LL_PROFILER_THREAD_END(name) FrameMarkEnd( name ) // C string
+ #define LL_PROFILER_THREAD_BEGIN(name) FrameMarkStart( name ); // C string
+ #define LL_PROFILER_THREAD_END(name) FrameMarkEnd( name ); // C string
// revert change that obscures custom FTM zones.
// #define LL_RECORD_BLOCK_TIME(name) ZoneScoped const LLTrace::BlockTimer& LL_GLUE_TOKENS(block_time_recorder, __LINE__)(LLTrace::timeThisBlock(name)); (void)LL_GLUE_TOKENS(block_time_recorder, __LINE__);
@@ -177,20 +177,20 @@ namespace LLProfiler
// #define LL_PROFILE_ZONE_NAMED_COLOR(name,color) ZoneNamedNC( ___tracy_scopped_zone, name, color, true ) // RGB
// #define LL_PROFILE_ZONE_SCOPED ZoneScoped
#define LL_PROFILE_ZONE_NAMED(name) ZoneNamedN( ___tracy_scoped_zone, name, LLProfiler::active );
- #define LL_PROFILE_ZONE_NAMED_COLOR(name,color) ZoneNamedNC( ___tracy_scopped_zone, name, color, LLProfiler::active ) // RGB
- #define LL_PROFILE_ZONE_SCOPED ZoneNamed( ___tracy_scoped_zone, LLProfiler::active ) // Enable deferred collection through filters
+ #define LL_PROFILE_ZONE_NAMED_COLOR(name,color) ZoneNamedNC( ___tracy_scopped_zone, name, color, LLProfiler::active ); // RGB
+ #define LL_PROFILE_ZONE_SCOPED ZoneNamed( ___tracy_scoped_zone, LLProfiler::active ); // Enable deferred collection through filters
//
- #define LL_PROFILE_ZONE_NUM( val ) ZoneValue( val )
- #define LL_PROFILE_ZONE_TEXT( text, size ) ZoneText( text, size )
+ #define LL_PROFILE_ZONE_NUM( val ) ZoneValue( val );
+ #define LL_PROFILE_ZONE_TEXT( text, size ) ZoneText( text, size );
#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
- #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 )
+ #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_CONFIG_SQUARE(name) TracyPlotConfig(name, tracy::PlotFormatType::Number, true, false, 0);
#define LL_PROFILE_IS_CONNECTED TracyIsConnected
//
#endif
@@ -215,16 +215,17 @@ namespace LLProfiler
// 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_PLOT_CONFIG_SQUARE(name)
#define LL_PROFILE_IS_CONNECTED
//
#endif // LL_PROFILER
#if LL_PROFILER_ENABLE_TRACY_OPENGL
-#define LL_PROFILE_GPU_ZONE(name) TracyGpuZone(name)
-#define LL_PROFILE_GPU_ZONEC(name,color) TracyGpuZoneC(name,color)
-#define LL_PROFILER_GPU_COLLECT TracyGpuCollect
-#define LL_PROFILER_GPU_CONTEXT TracyGpuContext
+#define LL_PROFILE_GPU_ZONE(name) TracyGpuZone(name);
+#define LL_PROFILE_GPU_ZONEC(name,color) TracyGpuZoneC(name,color);
+#define LL_PROFILER_GPU_COLLECT TracyGpuCollect;
+#define LL_PROFILER_GPU_CONTEXT TracyGpuContext;
+#define LL_PROFILER_GPU_CONTEXT_NS(name, size) TracyGpuContext;TracyGpuContextName(name,size);
// disable memory tracking (incompatible with GPU tracing
#define LL_PROFILE_ALLOC(ptr, size) (void)(ptr); (void)(size);
@@ -234,12 +235,13 @@ namespace LLProfiler
#define LL_PROFILE_GPU_ZONEC(name,color) (void)name;(void)color;
#define LL_PROFILER_GPU_COLLECT
#define LL_PROFILER_GPU_CONTEXT
+#define LL_PROFILER_GPU_CONTEXT_NS(name, size) (void)name;(void)size;
#define LL_LABEL_OBJECT_GL(type, name, length, label)
#if LL_PROFILER_CONFIGURATION > 1
-#define LL_PROFILE_ALLOC(ptr, size) TracyAlloc(ptr, size)
-#define LL_PROFILE_FREE(ptr) TracyFree(ptr)
+#define LL_PROFILE_ALLOC(ptr, size) TracyAlloc(ptr, size);
+#define LL_PROFILE_FREE(ptr) TracyFree(ptr);
#else
#define LL_PROFILE_ALLOC(ptr, size) (void)(ptr); (void)(size);
#define LL_PROFILE_FREE(ptr) (void)(ptr);
@@ -248,7 +250,7 @@ namespace LLProfiler
#endif
#if LL_PROFILER_ENABLE_RENDER_DOC
-#define LL_LABEL_OBJECT_GL(type, name, length, label) glObjectLabel(type, name, length, label)
+#define LL_LABEL_OBJECT_GL(type, name, length, label) glObjectLabel(type, name, length, label);
#else
#define LL_LABEL_OBJECT_GL(type, name, length, label)
#endif
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index c854e30060..389dc2c39e 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -122,6 +122,7 @@ void LLSDSerialize::serialize(const LLSD& sd, std::ostream& str, ELLSD_Serialize
// static
bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, llssize max_bytes)
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
char hdr_buf[MAX_HDR_LEN + 1] = ""; /* Flawfinder: ignore */
bool fail_if_not_legacy = false;
diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp
index 6f74bf3fc8..a34b8f1024 100644
--- a/indra/llcommon/lltimer.cpp
+++ b/indra/llcommon/lltimer.cpp
@@ -70,7 +70,7 @@ LLTimer* LLTimer::sTimer = NULL;
#if 0
void ms_sleep(U32 ms)
{
- LL_PROFILE_ZONE_SCOPED;
+ // LL_PROFILE_ZONE_SCOPED;
using TimePoint = std::chrono::steady_clock::time_point;
auto resume_time = TimePoint::clock::now() + std::chrono::milliseconds(ms);
while (TimePoint::clock::now() < resume_time)
diff --git a/indra/llcorehttp/_httppolicy.cpp b/indra/llcorehttp/_httppolicy.cpp
index 704c8abb93..03ac521b87 100644
--- a/indra/llcorehttp/_httppolicy.cpp
+++ b/indra/llcorehttp/_httppolicy.cpp
@@ -213,6 +213,7 @@ void HttpPolicy::retryOp(const HttpOpRequest::ptr_t &op)
//
HttpService::ELoopSpeed HttpPolicy::processReadyQueue()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;// missing http trace
const HttpTime now(totalTime());
HttpService::ELoopSpeed result(HttpService::REQUEST_SLEEP);
HttpLibcurl & transport(mService->getTransport());
diff --git a/indra/llmessage/llmessagetemplate.h b/indra/llmessage/llmessagetemplate.h
index 85a765b085..e949d2b395 100644
--- a/indra/llmessage/llmessagetemplate.h
+++ b/indra/llmessage/llmessagetemplate.h
@@ -365,6 +365,7 @@ public:
BOOL callHandlerFunc(LLMessageSystem *msgsystem) const
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
if (mHandlerFunc)
{
diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp
index 0fd8ee875c..1eec975d46 100644
--- a/indra/llmessage/lltemplatemessagereader.cpp
+++ b/indra/llmessage/lltemplatemessagereader.cpp
@@ -541,6 +541,11 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
llassert( mCurrentRMessageTemplate);
llassert( !mCurrentRMessageData );
delete mCurrentRMessageData; // just to make sure
+ // storage for Tracy tag
+ #ifdef TRACY_ENABLE
+ static char msgstr[36];
+ #endif
+ //
// The offset tells us how may bytes to skip after the end of the
// message name.
@@ -556,6 +561,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
iter != mCurrentRMessageTemplate->mMemberBlocks.end();
++iter)
{
+ LL_PROFILE_ZONE_NAMED_CATEGORY_NETWORK("BuildFromTemplate");
LLMessageBlock* mbci = *iter;
U8 repeat_number;
S32 i;
@@ -598,6 +604,13 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
}
LLMsgBlkData* cur_data_block = NULL;
+ // Tracy Message processing
+ LL_DEBUGS("LLMessage") << "Processing " << mbci->mName << " with " << repeat_number << " repetitions" << LL_ENDL;
+ #ifdef TRACY_ENABLE
+ strncpy(msgstr, mbci->mName, 35);
+ LL_PROFILE_ZONE_TEXT(msgstr, 35);
+ #endif
+ //
// now loop through the block
for (i = 0; i < repeat_number; i++)
@@ -622,6 +635,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
mbci->mMemberVariables.begin();
iter != mbci->mMemberVariables.end(); iter++)
{
+ LL_PROFILE_ZONE_NAMED_CATEGORY_NETWORK("AddVariables");
const LLMessageVariable& mvci = **iter;
// ok, build out the variables
@@ -704,6 +718,12 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
}
{
+ // Tracy Message processing
+ LL_PROFILE_ZONE_NAMED_CATEGORY_NETWORK("ProcessMessage");
+ #ifdef TRACY_ENABLE
+ LL_PROFILE_ZONE_TEXT(msgstr, 35);
+ #endif
+ //
static LLTimer decode_timer;
if(LLMessageReader::getTimeDecodes() || gMessageSystem->getTimingCallback())
@@ -742,7 +762,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
if(decode_time > LLMessageReader::getTimeDecodesSpamThreshold())
{
- LL_DEBUGS() << "--------- Message " << mCurrentRMessageTemplate->mName << " decode took " << decode_time << " seconds. (" <<
+ LL_DEBUGS("LLMessage") << "--------- Message " << mCurrentRMessageTemplate->mName << " decode took " << decode_time << " seconds. (" <<
mCurrentRMessageTemplate->mMaxDecodeTimePerMsg << " max, " <<
(mCurrentRMessageTemplate->mTotalDecodeTime / mCurrentRMessageTemplate->mTotalDecoded) << " avg)" << LL_ENDL;
}
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 6d41a5a22d..5a83c6e68f 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -2547,6 +2547,7 @@ void LLImageGLThread::run()
// WorkQueue, likewise cleanup afterwards.
mWindow->makeContextCurrent(mContext);
gGL.init(false);
+ LL_PROFILER_GPU_CONTEXT_NS("LLImageGL Context", 17);
LL::ThreadPool::run();
gGL.shutdown();
mWindow->destroySharedContext(mContext);
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 78227a7207..548ce6c308 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -237,6 +237,7 @@ public:
{
mWindow->makeContextCurrent(mContext);
gGL.init(false);
+ LL_PROFILER_GPU_CONTEXT_NS("LLGLWorker Context", 18);
mQueue->runUntilClose();
gGL.shutdown();
mWindow->destroySharedContext(mContext);
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 2f2d2cca88..2573b8be5b 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1686,6 +1686,7 @@ const S32 max_format = (S32)num_formats - 1;
close();
return FALSE;
}
+ //LL_PROFILER_GPU_CONTEXT; TODO(Beq) review this
LL_PROFILER_GPU_CONTEXT
@@ -1720,7 +1721,7 @@ const S32 max_format = (S32)num_formats - 1;
swapBuffers();
}
- LL_PROFILER_GPU_CONTEXT;
+ LL_PROFILER_GPU_CONTEXT_NS("MainGL Context", 14);
return TRUE;
}
@@ -1890,7 +1891,7 @@ void* LLWindowWin32::createSharedContext()
void LLWindowWin32::makeContextCurrent(void* contextPtr)
{
wglMakeCurrent(mhDC, (HGLRC) contextPtr);
- LL_PROFILER_GPU_CONTEXT;
+
}
void LLWindowWin32::destroySharedContext(void* contextPtr)
diff --git a/indra/newview/llperfstats.h b/indra/newview/llperfstats.h
index 0038d160fb..1e99fa343a 100644
--- a/indra/newview/llperfstats.h
+++ b/indra/newview/llperfstats.h
@@ -279,13 +279,16 @@ namespace LLPerfStats
auto ot{upd.objType};
auto& key{upd.objID};
+ auto& avKey{upd.avID};
auto type {upd.statType};
auto val {upd.time};
// markup to support coverage testing on stats collection
#ifdef TRACY_ENABLE
- //LL_PROFILE_ZONE_TEXT(key.toStringFast(obstr), 36);
- //LL_PROFILE_ZONE_TEXT(avKey.toStringFast(avstr), 36);
- //LL_PROFILE_ZONE_NUM(val);
+ static char obstr[36];
+ static char avstr[36];
+ LL_PROFILE_ZONE_TEXT(key.toStringFast(obstr), 36);
+ LL_PROFILE_ZONE_TEXT(avKey.toStringFast(avstr), 36);
+ LL_PROFILE_ZONE_NUM(val);
#endif
//
@@ -295,6 +298,14 @@ namespace LLPerfStats
doUpd(key, ot, type,val);
return;
}
+
+
+ if (ot == ObjType_t::OT_AVATAR)
+ {
+ // LL_INFOS("perfstats") << "Avatar update:" << LL_ENDL;
+ doUpd(avKey, ot, type, val);
+ return;
+ }
}
static inline void doUpd(const LLUUID& key, ObjType_t ot, StatType_t type, uint64_t val)
@@ -429,13 +440,13 @@ namespace LLPerfStats
//
stat.time = LLTrace::BlockTimer::getCPUClockCount64() - start;
// extra profiling coverage tracking
- #ifdef ATTACHMENT_TRACKING
- static char obstr[36];
- static char avstr[36];
- LL_PROFILE_ZONE_NUM(static_cast(stat.objType));
- LL_PROFILE_ZONE_TEXT(stat.avID.toStringFast(avstr), 36);
- LL_PROFILE_ZONE_TEXT(stat.objID.toStringFast(obstr), 36);
- LL_PROFILE_ZONE_NUM(stat.time);
+ #if TRACY_ENABLE && defined(ATTACHMENT_TRACKING)
+ // static char obstr[36];
+ // static char avstr[36];
+ // LL_PROFILE_ZONE_NUM(static_cast(stat.objType));
+ // LL_PROFILE_ZONE_TEXT(stat.avID.toStringFast(avstr), 36);
+ // LL_PROFILE_ZONE_TEXT(stat.objID.toStringFast(obstr), 36);
+ // LL_PROFILE_ZONE_NUM(stat.time);
#endif
//
StatsRecorder::send(std::move(stat));
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 381a773e9e..0f98d9c548 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -834,6 +834,7 @@ void LLViewerRegion::setRegionID(const LLUUID& region_id)
void LLViewerRegion::loadObjectCache()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
if (mCacheLoaded)
{
return;
@@ -3126,6 +3127,7 @@ void LLViewerRegion::clearVOCacheFromMemory()
void LLViewerRegion::unpackRegionHandshake()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
LLMessageSystem *msg = gMessageSystem;
U64 region_flags = 0;
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 32b614d596..f0d51199ab 100644
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -1541,6 +1541,7 @@ BOOL LLVOCache::updateEntry(const HeaderEntryInfo* entry)
bool LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map)
//
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
if(!mEnabled)
{
LL_WARNS() << "Not reading cache for handle " << handle << "): Cache is currently disabled." << LL_ENDL;
@@ -1559,6 +1560,7 @@ bool LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca
S32 num_entries=0; // FIRE-33808 - Material Override Cache causes long delays
std::string filename;
{
+ LL_PROFILE_ZONE_NAMED_CATEGORY_NETWORK("VOCache:loadRegionObjectCache");
LLUUID cache_id;
getObjectCacheFilename(handle, filename);
LLAPRFile apr_file(filename, APR_READ|APR_BINARY, mLocalAPRFilePoolp);
@@ -1567,6 +1569,7 @@ bool LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca
if(success)
{
+ LL_PROFILE_ZONE_NAMED_CATEGORY_NETWORK("VOCache:loadCacheForRegion");
if(cache_id != id)
{
LL_INFOS() << "Cache ID doesn't match for this region, discarding"<< LL_ENDL;
@@ -1615,6 +1618,7 @@ bool LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca
// void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map)
void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map)
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
int loaded= 0;
int discarded = 0;
// get ViewerRegion pointer from handle
@@ -1635,6 +1639,13 @@ void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCac
}
std::string filename(getObjectCacheExtrasFilename(handle));
+ // Material Override Cache caused long delays
+ #ifdef TRACY_ENABLE
+ static char extra_filename[256];
+ strncpy(extra_filename, filename.c_str(), 256);
+ LL_PROFILE_ZONE_TEXT(extra_filename,256);
+ #endif
+ //
llifstream in(filename, std::ios::in | std::ios::binary);
std::string line;
@@ -1714,8 +1725,10 @@ void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCac
LL_DEBUGS("GLTF") << "Beginning reading extras cache for handle " << handle << " from " << getObjectCacheExtrasFilename(handle) << LL_ENDL;
LLSD entry_llsd;
+ LL_PROFILE_ZONE_NUM(num_entries);
for (U32 i = 0; i < num_entries && !in.eof(); i++)
{
+ LL_PROFILE_ZONE_NAMED_CATEGORY_NETWORK("RegionExtrasReadEntries");
static const U32 max_size = 4096;
bool success = LLSDSerialize::deserialize(entry_llsd, in, max_size);
// check bool(in) this time since eof is not a failure condition here
@@ -1756,6 +1769,7 @@ void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCac
void LLVOCache::purgeEntries(U32 size)
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
// FIRE-33808 - Material Override Cache causes long delays
LL_DEBUGS("VOCache","GLTF") << "Purging " << size << " entries from cache" << LL_ENDL;
while(mHeaderEntryQueue.size() > size)
@@ -1775,6 +1789,7 @@ void LLVOCache::purgeEntries(U32 size)
void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, bool removal_enabled)
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
// FIRE-33808 - Material Override Cache causes long delays
std::string filename;
getObjectCacheFilename(handle, filename);
@@ -1942,6 +1957,7 @@ void LLVOCache::removeGenericExtrasForHandle(U64 handle)
void LLVOCache::writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, BOOL dirty_cache, bool removal_enabled)
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
if(!mEnabled)
{
LL_WARNS() << "Not writing extras cache for handle " << handle << "): Cache is currently disabled." << LL_ENDL;