Age | Commit message (Collapse) | Author |
|
|
|
|
|
LLMemTracked, introduce alignas, hook most/all reamining allocs, disable synchronous occlusion, and convert frequently accessed LLSingletons to LLSimpleton
|
|
|
|
The previous implementation went to some effort to crash if anyone attempted
to create or destroy an LLInstanceTracker subclass instance during traversal.
That restriction is manageable within a single thread, but becomes unworkable
if it's possible that a given subclass might be used on more than one thread.
Remove LLInstanceTracker::instance_iter, beginInstances(), endInstances(),
also key_iter, beginKeys() and endKeys(). Instead, introduce key_snapshot()
and instance_snapshot(), the only means of iterating over LLInstanceTracker
instances. (These are intended to resemble functions, but in fact the current
implementation simply presents the classes.) Iterating over a captured
snapshot defends against container modifications during traversal. The term
'snapshot' reminds the coder that a new instance created during traversal will
not be considered. To defend against instance deletion during traversal, a
snapshot stores std::weak_ptrs which it lazily dereferences, skipping on the
fly any that have expired.
Dereferencing instance_snapshot::iterator gets you a reference rather than a
pointer. Because some use cases want to delete all existing instances, add an
instance_snapshot::deleteAll() method that extracts the pointer. Those cases
used to require explicitly copying instance pointers into a separate
container; instance_snapshot() now takes care of that. It remains the caller's
responsibility to ensure that all instances of that LLInstanceTracker subclass
were allocated on the heap.
Replace unkeyed static LLInstanceTracker::getInstance(T*) -- which returned
nullptr if that instance had been destroyed -- with new getWeak() method
returning std::weak_ptr<T>. Caller must detect expiration of that weak_ptr.
Adjust tests accordingly.
Use of std::weak_ptr to detect expired instances requires engaging
std::shared_ptr in the constructor. We now store shared_ptrs in the static
containers (std::map for keyed, std::set for unkeyed).
Make LLInstanceTrackerBase a template parameterized on the type of the static
data it manages. For that reason, hoist static data class declarations out of
the class definitions to an LLInstanceTrackerStuff namespace.
Remove the static atomic sIterationNestDepth and its methods incrementDepth(),
decrementDepth() and getDepth(), since they were used only to forbid creation
and destruction during traversal.
Add a std::mutex to static data. Introduce an internal LockStatic class that
locks the mutex while providing a pointer to static data, making that the only
way to access the static data.
The LLINSTANCETRACKER_DTOR_NOEXCEPT macro goes away because we no longer
expect ~LLInstanceTracker() to throw an exception in test programs.
That affects LLTrace::StatBase as well as LLInstanceTracker itself.
Adapt consumers to the new LLInstanceTracker API.
|
|
|
|
|
|
|
|
|
|
updates appearance utility dependency
|
|
|
|
added flag to LLInstanceTracker to allow multiple values per key
made StatType allow multiple values per key to eliminate block timer related crash
|
|
|
|
|
|
added more MemTrackable types
optimized memory usage of LLTrace some more
|
|
removed complicated and unnecessary fast timer gapless handoff logic (it should be gapless anyway)
improved MemTrackable API, better separation of shadow and footprint
added memory usage stats to floater_stats.xml
|
|
|
|
renamed "current" to "primary" when referring to accumulators
|
|
another attempt to move mem stat into base class
|
|
changed unit declarations macros to make a lot more sense
|
|
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
|
|
|
|
|
|
added convenience types for units F32Seconds, etc.
|
|
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
|
|
moved object cache sampling code so that it actually gets executed
default values for stats are NaN instead of 0 in many cases
|
|
getter/setter
|
|
|
|
fixed ostream precision munging in llsys
|
|
also, removed LLTrace::init and cleanup
removed derived class implementation of memory stat for LLMemTrackable
is automatic now
|
|
removed LLThreadLocalSingleton
collapsed all thread recorder classes to single type, LLTrace::ThreadRecorder
moved fasttimer stack head to llthreadlocalsingletonpointer via ThreadRecorder
|
|
console
added ability to force uniqueness of LLCopyOnWritePointer
converted more variables to units
added convenience function for unit constants
|
|
|
|
|
|
moved collapsed flag to fast timer tree node
|
|
removed implicit flushes on reads from recorders for better performance
made sure stack timers were updated on recorder deactivate
faster rendering and better ui for fast timer view
|
|
added getAs and setAs to LLUnit to make it clearer how you specify units
removed accidental 0-based indexing of periodicRecording history...
should now be consistently 1-based, with 0 accessing current active recording
removed per frame timer updates of all historical timer bars in fast timer display
added missing assignment operator to recordings
|
|
changed Units macros and argument order to make it more clear
optimized units for integer types
fixed merging of periodicrecordings...should eliminate duplicate entries in sceneloadmonitor history
|
|
|
|
reverted SlaveThreadRecorder update gating
moved processTimes() outside of Recording, so it is called only once per frame
refined sample merge logic so that multi-threaded samples do not stomp on linear history
of a stat
|
|
|
|
|
|
|
|
|
|
|
|
|
|
removed PeriodicRecording::getTotalRecording as it was showing up at the top on the profiler
renamed getPrevRecordingPeriod, etc. to getPrevRecording
|
|
|
|
|
|
|