diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2022-01-13 11:22:56 -0800 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2022-01-13 11:22:56 -0800 |
commit | ca9a33a24bc2ff073240974a6bd0ffa5e9895b5d (patch) | |
tree | 41160e2f326dff2729b33ce0b16e776338df09e8 /indra/llcommon/llprofiler.h | |
parent | c3aab3abe1f9871c1afa24dc8747ead6c64490e3 (diff) |
SL-16606: Include profiler categories automatically
Diffstat (limited to 'indra/llcommon/llprofiler.h')
-rw-r--r-- | indra/llcommon/llprofiler.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/indra/llcommon/llprofiler.h b/indra/llcommon/llprofiler.h index ca60d23248..f9d7ae7ce4 100644 --- a/indra/llcommon/llprofiler.h +++ b/indra/llcommon/llprofiler.h @@ -27,6 +27,44 @@ #ifndef LL_PROFILER_H #define LL_PROFILER_H +// If you use the default macros LL_PROFILE_ZONE_SCOPED and LL_PROFILE_ZONE_NAMED to profile code ... +// +// void foo() +// { +// LL_PROFILE_ZONE_SCOPED; +// : +// +// { +// LL_PROFILE_ZONE_NAMED("widget bar"); +// : +// } +// { +// LL_PROFILE_ZONE_NAMED("widget qux"); +// : +// } +// } +// +// ... please be aware that ALL these will show up in a Tracy capture which can quickly exhaust memory. +// Instead, use LL_PROFILE_ZONE_SCOPED_CATEGORY_* and LL_PROFILE_ZONE_NAMED_CATEGORY_* to profile code ... +// +// void foo() +// { +// LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; +// : +// +// { +// LL_PROFILE_ZONE_NAMED_CATEGORY_UI("widget bar"); +// : +// } +// { +// LL_PROFILE_ZONE_NAMED_CATEGORY_UI("widget qux"); +// : +// } +// } +// +// ... as these can be selectively turned on/off. This will minimize memory usage and visual clutter in a Tracy capture. +// See llprofiler_categories.h for more details on profiling categories. + #define LL_PROFILER_CONFIG_NONE 0 // No profiling #define LL_PROFILER_CONFIG_FAST_TIMER 1 // Profiling on: Only Fast Timers #define LL_PROFILER_CONFIG_TRACY 2 // Profiling on: Only Tracy @@ -108,4 +146,6 @@ extern thread_local bool gProfilerEnabled; #define LL_PROFILER_SET_THREAD_NAME( name ) (void)(name) #endif // LL_PROFILER +#include "llprofilercategories.h" + #endif // LL_PROFILER_H |