Commit Graph

39 Commits (0465c761a4cd14003d57d33f5edaa185d6fd7a01)

Author SHA1 Message Date
Alexander Gavriliuk 57d784f807 SL-18620 Statistics->Advanced->Memory Usage no longer updating 2023-08-24 20:47:26 +02:00
Nat Goodspeed 12f66fda13 DRTVWR-565: Merge branch 'origin/contribute' into DRTVWR-565 2022-12-12 13:27:57 -05:00
Nat Goodspeed 4349cb6165 DRTVWR-575: Address review comments on Xcode 14.1 type tweaks.
Introduce LLSD template constructors and assignment operators to disambiguate
construction or assignment from any integer type to Integer, likewise any
floating point type to Real. Use new narrow() function to validate
conversions.

For LLSD method parameters converted from LLSD::Integer to size_t, where the
method previously checked for a negative argument, make it now check for
size_t converted from negative: in other words, more than S32_MAX. The risk of
having a parameter forced from negative to unsigned exceeds the risk of a
valid length or index over that max.

In lltracerecording.cpp's PeriodicRecording, now that mCurPeriod and
mNumRecordedPeriods are size_t instead of S32, defend against subtracting 1
from 0.

Use narrow() to validate newly-introduced narrowing conversions.

Make llclamp() return the type of the raw input value, even if the types of
the boundary values differ.

std::ostream::tellp() no longer returns a value we can directly report as a
number. Cast to U64.
2022-11-12 18:59:21 -10:00
Nat Goodspeed 9522a0b7c1 DRTVWR-575: Fix llcommon assumptions that size_t fits in 4 bytes.
It's a little distressing how often we have historically coded S32 or U32 to
pass a length or index.

There are more such assumptions in other viewer subdirectories, but this is a
start.
2022-11-03 14:58:32 -04:00
Andrey Kleshchev fe26a9d32c SL-17868 Crash at ThreadRecorder::bringUpToDate
According to bugsplat get_thread_recorder was null
Replaced apr based LLThreadLocalPointer with thread_local
2022-07-30 02:57:30 +03:00
Dave Parks 8d20480c5f SL-16148 SL-16244 SL-16270 SL-16253 Remove most BlockTimers, remove LLMemTracked, introduce alignas, hook most/all reamining allocs, disable synchronous occlusion, and convert frequently accessed LLSingletons to LLSimpleton 2021-10-28 18:06:21 +00:00
Richard Linden d4f3fe3c56 SH-4653 FIX Interesting: Viewer crashes while reading chat history 2013-12-10 12:50:23 -08:00
Richard Linden 6b84d40558 added some comments and changed calls from get_master_thread_recorder()
over to get_thread_recorder() to be agnostic about which thread we're running on
2013-12-05 21:58:45 -08:00
Richard Linden 697d2e720b renamed TimeBlock to BlockTimerStatHandle 2013-10-15 20:24:42 -07:00
Richard Linden 17df8988fe renamed TraceType to StatType
added more MemTrackable types
optimized memory usage of LLTrace some more
2013-10-07 13:38:03 -07:00
Richard Linden 754e8752a9 added initial memory usage tracking for lltrace 2013-10-03 14:30:34 -07:00
Richard Linden 3fd68662f2 added memory usage and occlusion events to traces
renamed "current" to "primary" when referring to accumulators
2013-09-07 21:16:39 -07:00
Richard Linden 2c6bc5afa5 SH-4433 WIP Interesting: Statistics > Ping Sim is always 0 ms
made getPrimaryAccumulator return a reference since it was an
always non-null pointer
changed unit conversion to perform lazy division in order to avoid truncation
of timer values
2013-08-21 14:06:57 -07:00
Richard Linden cc31b4ae79 SH-4399 FIX: Interesting: Texture console MB Bound 0/384 and texture queue bounces once per second
SH-4346 FIX: Interesting: some integer Statistics are displayed as floating point after crossing region boundary
made llerrs/infos/etc properly variadic wrt tags
LL_INFOS("A", "B", "C") works, for example
fixed unit tests
remove llsimplestat
2013-08-12 20:05:16 -07:00
Richard Linden e340009fc5 second phase summer cleaning
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
2013-08-09 17:11:19 -07:00
Richard Linden 04bdc8ba83 SH-4294 FIX Interesting: Statistics Texture cache hit rate is always 0%
also, removed LLTrace::init and cleanup
removed derived class implementation of memory stat for LLMemTrackable
is automatic now
2013-07-01 17:04:01 -07:00
Richard Linden 2fc422f39d fixed memory leak due to implementation of LLThreadLocalSingleton
removed LLThreadLocalSingleton
collapsed all thread recorder classes to single type, LLTrace::ThreadRecorder
moved fasttimer stack head to llthreadlocalsingletonpointer via ThreadRecorder
2013-06-30 13:32:34 -07:00
Richard Linden 8bddaeec66 fixed scene load monitor resetting to eagerly due to spurious camer amotion
pulled swap() out of ui time block
cleaned up internal lltrace dependencies, factored out common accumulator definitions
2013-06-22 12:00:18 -07:00
Richard Linden c5fc8f9006 SH-4246 FIX interesting: fast timers significantly decreases framerate
moved collapsed flag to fast timer tree node
2013-06-19 08:23:53 -07:00
Richard Linden 9ae76d1215 SH-3931 WIP Interesting: Add graphs to visualize scene load metrics
fixed copy construction behavior of Recordings to not zero out data
split measurement into event and sample, with sample representing
a continuous function
2013-05-29 17:00:50 -07:00
Richard Linden 0ba9a00c31 SH-3468 WIP add memory tracking base class
cleaned up hacks used to get unit tests working
LLTrace::init now supports recursive initialization/cleanup
put NOMINMAX back in win32 header wrappers
2013-01-08 23:50:27 -08:00
Richard Linden cda2cdda51 SH-3406 WIP convert fast timers to lltrace system
made fast timer stack thread local
added LLThreadLocalSingleton
made LLThreadLocalPointer obey pointer rules for const
added LLThreadLocalSingletonPointer for fast thread local pointers
2013-01-03 00:30:54 -08:00
Richard Linden 013f04cabe SH-3468 WIP add memory tracking base class
improvements on lifetime of lltrace core data structures
tweaks to thread local pointer handling so that static constructors/destructors
can safely call functions that use lltrace
2012-12-21 00:13:21 -08:00
Richard Linden 6db6cb39f4 SH-3406 WIP convert fast timers to lltrace system
got new fast timer code to compile and run
2012-11-16 23:02:53 -08:00
Richard Linden c136b43214 SH-3406 WIP convert fast timers to lltrace system
eliminated min and max macros from windows.h
got rest of viewer to compile against llfasttimer changes
2012-11-15 19:46:09 -08:00
Richard Linden 9d77e030d9 SH-3406 WIP convert fast timers to lltrace system
cleaning up build
moved most includes of windows.h to llwin32headers.h to disable min/max macros, etc
streamlined Time class and consolidated functionality in BlockTimer class
llfasttimer is no longer included via llstring.h, so had to add it manually in several places
2012-11-14 23:52:27 -08:00
Richard Linden 67ec47e6da SH-3406 WIP convert fast timers to lltrace system
moving fast timers into lltrace namespace and accumulation system
2012-11-13 17:10:10 -08:00
Richard Linden a3e3e8b4cc SH-3406 WIP convert fast timers to lltrace system
simplified llfasttimer code down to 2 classes
llunit unit conversion now done in floating point or 64 bit integer precision,
depending on source type
2012-11-12 19:08:14 -08:00
Richard Linden 74ac0182ec SH-3405 WIP convert existing stats to lltrace system
fixed units conversion so that trace getters return convertable units
removed circular dependencies from lltrace*
converted more stats to lltrace
2012-10-10 19:25:56 -07:00
Richard Linden 3960fdf9e0 SH-3275 WIP Update viewer metrics system to be more flexible
moved threadrecorder classes into separate file
added Count trace type, which tracks value increases and decreases and can report churn
as well as overall growth rate
2012-10-04 23:11:57 -07:00
Richard Linden 7196619b4a SH-3275 WIP Update viewer metrics system to be more flexible
implemented minimal merging logic
made recordings ligher weight by moving live tracking data into threadrecorder
2012-10-02 17:14:12 -07:00
Richard Linden dbe9742703 SH-3404 create sampler class
renamed LLTrace::ThreadTrace to LLTrace::ThreadRecorder
renamed LLTrace::Sampler to LLTrace::Recording
2012-10-02 15:37:16 -07:00
Richard Linden 14b1b0b2bb SH-3275 WIP Run viewer metrics for object update messages
cleaned up API
samplers are now value types with copy-on-write buffers under the hood
removed coupling with LLThread
2012-10-01 19:39:04 -07:00
Richard Linden b1baf982b1 SH-3275 WIP Run viewer metrics for object update messages
factored out lltrace::sampler into separate file
added rudimentary lltrace support to llstatgraph
made llstatgraph use param blocks more effectively
moves initial set of stats over to lltrace
removed windows.h #defines for min and max
2012-09-30 10:41:29 -07:00
Richard Linden 38354e1906 SH-3275 WIP Run viewer metrics for object update messages
created separate constructor for static allocation of sampler buffer
fixed start/stop/resume semantics of samplers and added sampler time interval tracking
2012-09-28 10:45:14 -07:00
Richard Linden 07c4be092b SH-3275 WIP Run viewer metrics for object update messages
slave threads now pushing data to master thread
2012-09-26 19:12:40 -07:00
Richard Linden 05a3203d82 SH-3275 WIP Run viewer metrics for object update messages
fixed various issues related to unit tests and LLThreadLocalPtr initialization and teardown
2012-09-26 17:04:57 -07:00
Richard Linden adeeabfc13 SH-3275 WIP Run viewer metrics for object update messages
moved LLThreadLocalPtr to llapr
fixed various startup race conditions for LLThreadLocalPtr
2012-09-24 18:56:01 -07:00
Richard Linden 735fde8c74 SH-3275 WIP Run viewer metrics for object update messages
added LLThreadLocalPtr
broke llmutex out into llmutex.h
got primary sampling buffer under thread local storage
2012-09-21 18:52:08 -07:00