Age | Commit message (Collapse) | Author |
|
|
|
LLInstanceTracker<T> performs validation in ~LLInstanceTracker(). Normally
validation failure logs an error and terminates the program, which is fine. In
the test executable, though, we want validation failure to throw an exception
instead so we can catch it and continue testing other failure conditions. But
since destructors in C++11 are implicitly noexcept(true), that exception never
made it out of ~LLInstanceTracker(): it crashed the test program instead.
Declaring ~LLInstanceTracker() noexcept(false) solves that, allowing the test
program to catch the exception and continue.
However, if we unconditionally declare that, then every destructor anywhere in
the inheritance hierarchy for any LLInstanceTracker subclass must also be
noexcept(false)! That's way too pervasive, especially for functionality we
only need (or want) in a specific test executable.
Instead, make the CMake macros LL_ADD_PROJECT_UNIT_TESTS() and
LL_ADD_INTEGRATION_TEST() -- with which we define all viewer build-time tests
-- define two new command-line macros: LL_TEST=testname and LL_TEST_testname.
That way, preprocessor logic in a header file can detect whether it's being
compiled for production code or for a test executable.
(While at it, encapsulate in a new GET_OPT_SOURCE_FILE_PROPERTY() CMake macro
an ugly repetitive pattern. The builtin GET_SOURCE_FILE_PROPERTY() sets the
target variable to "NOTFOUND" -- rather than an empty string -- if the
specified property wasn't set. Every call to GET_SOURCE_FILE_PROPERTY() in
LL_ADD_PROJECT_UNIT_TESTS() was followed by a test for NOTFOUND and an
assignment to "". Wrap all that in a macro whose 'unset' value is "".)
Now llinstancetracker.h can detect when we're building the LLInstanceTracker
unit test executable, and *only then* declare ~LLInstanceTracker() as
noexcept(false). We #define LLINSTANCETRACKER_DTOR_NOEXCEPT to expand either
empty or noexcept(false), also detecting clang in C++11 mode. (It all works
fine without noexcept(false) until we turn on C++11 mode.)
We also use that macro for the StatBase class in lltrace.h. Turns out some of
the infrastructure headers required for tests in general, including the
LLInstanceTracker test, use LLInstanceTracker. Fortunately that appears to be
the only other class we must annotate this way for the LLInstanceTracker tests.
|
|
|
|
in IMs or group IMs
|
|
renamed fast timers to have unique names, changes instance tracker to never allow duplicates
|
|
containing a shared object
potential fix by making instance tracker allow key collisions for LLToastNotifyPanel
changed assertion macro to use original unpreprocessed source code
renamed instance tracker behavior macros to use LL prefix
added RestoreCameraPosOnLogin setting to optionally restore old camera positioning behavior
|
|
fix for bad values returns from getPeriodMin and getPeriodMax on count stats when no counts recorded
fix for gcc compile time error (typename ftw)
|
|
added flag to LLInstanceTracker to allow multiple values per key
made StatType allow multiple values per key to eliminate block timer related crash
|
|
|
|
|
|
so singleton cleanup doesn't do things it really ought not do
|
|
consolidated most indra-specific constants in llcommon under indra_constants.h
fixed issues with operations on mixed unit types (implicit and explicit)
made LL_INFOS() style macros variadic in order to subsume other logging methods
such as ll_infos
added optional tag output to error recorders
|
|
dependency cleanup - removed a lot of unecessary includes
|
|
|
|
|
|
|
|
added ExtendablePeriodicRecording
and ability to append periodic recordings to each other
|
|
removed unused dll support from llinstancetracker as it didn't appear to be thread safe
|
|
|
|
|
|
|
|
|
|
foo to find some pointers
|
|
fixed crash on exit by making LLInstanceTracker iterators use atomic iterator
nesting count for thread safety
|
|
final removal of remaining LLStat code
|
|
|
|
For the T* specialization (no string, or whatever, key), the original
getInstance() method simply returned the passed-in T* value. It was defined,
as the comments noted, for completeness of the analogy with the keyed
LLInstanceTracker specialization.
It turns out, though, that getInstance(T*) can still be useful to ask whether
the T* you have in hand still references a valid T instance. Support that
usage.
|
|
phase 2, removal of extraneous signaling in favor of llnotificationchannels
made notificationchannels work better with overrides and lifetime managed
by creator
|
|
|
|
Now that we have unit tests that require assertion failure if you try to
delete an LLInstanceTracker subclass instance with an iterator loose, having
llassert() "sometimes" compile away (whimsically, depending on platform as
well as build type!) makes those tests fail. Use llassert_always() instead.
|
|
Generalize the notion of getting some chunk of "static" storage: introduce
LLInstanceTrackerBase::getStatic() template method. Define StaticData struct
containing the InstanceMap (or InstanceSet, for that specialization) along
with the S32 that caused the VS2010 linker so much grief. Completely eliminate
that S32 as an actual class-static member, qualifying all references with the
struct returned by getStatic().
In LLInstanceTrackerBase::getInstances(), use one std::map lookup instead of
three.
|
|
Fix LLInstanceTracker::key_iter constructor param; accepting
InstanceMap::iterator by non-const reference relied on Microsoft extension
that accepts non-const reference to an rvalue. Given typical iterator
implementation, simply accept by value instead, which makes gcc happy too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
panel - profile panel position changes do not persist
EXP-1030 FIX Search button toggle can get out of synch in bottom bar
made llinstancetracker::iterator do own nested level management (removing need for separate guard)
added support for filename= to floaters
can pass in arbitrary window_class to floaters
|
|
boundaries.
|
|
|
|
|
|
|
|
For both the (so far unused) generic KEY form and the KEY = T* form, provide
key_iter, beginKeys(), endKeys().
Change instance_iter so that when dereferenced, it gives you a T& rather than
a T*, to be more harmonious with a typical STL container. (You parameterize
LLInstanceTracker with T, not with T*.)
Fix existing usage in llfasttimer.cpp and lltimer.cpp to agree.
For the KEY = T* specialization, add T* getInstance(T*) so client isn't forced
to know which variant was used.
Add unit tests for uniformity of public operations on both variants.
|
|
tracker that won't work with llcommon.dll
|
|
cycles on my 2.5Ghz Xeon)
can call LLFastTimer::nextFrame with timers still on the stack...first step towards more flexible data gathering
LLInstanceTracker works with statically allocated instances now
reviewed by Brad
|
|
ignore-dead-branch
|