Commit Graph

2700 Commits (e6f53dedb704c92af45ede2d97c559cb6639358f)

Author SHA1 Message Date
Brad Payne (Vir Linden) 17384ce6c4 MAINT-7195 work (can't repro), removed UDP fetching path, handle more possible timing issues while connecting to region 2017-03-20 16:04:02 -04:00
Brad Payne (Vir Linden) f70abb4ad6 SL-409 - added tracking for bytes fetched to viewer assets metrics (does not currently work for textures) 2017-03-03 15:14:09 -05:00
Brad Payne (Vir Linden) 86449a0ac4 SL-409 - debug setting to enable/disable use of ViewerAsset cap by asset type. Temporary construction until UDP path goes away. 2017-02-14 09:31:08 -05:00
AndreyL ProductEngine 2abd0eef41 Merged in lindenlab/viewer-release
DRTVWR-412 Bento (avatar skeleton extensions)
2016-12-05 21:51:29 +02:00
Brad Payne (Vir Linden) d31596db6a merge 2016-11-16 08:39:41 -05:00
AndreyL ProductEngine 7fceb3a63f Merged in lindenlab/viewer-cleanup 2016-11-14 22:04:37 +02:00
andreykproductengine 26e73e2f58 MAINT-6825 Fixing bad_alloc crash 2016-10-28 17:29:30 +03:00
Brad Payne (Vir Linden) 0200135224 merge 2016-10-18 16:59:15 -04:00
andreykproductengine 759b4f14d8 MAINT-6828 Removed unnessesary spam in logs 2016-10-13 22:49:06 +03:00
AndreyL ProductEngine 740159f004 Merged in lindenlab/viewer-bear 2016-10-15 07:08:22 +03:00
Nat Goodspeed 23d50f53cb MAINT-5232: Ensure custom operator<<() overload is visible to TUT. 2016-10-13 07:11:18 -04:00
Nat Goodspeed 763509589d MAINT-5232: Add LLHeteroMap to contain objects of unrelated classes. 2016-10-12 23:01:48 -04:00
Glenn Glazer 86be29fe80 merge maint-6633 to fork of viewer-bear 2016-10-11 14:42:58 -07:00
Glenn Glazer d68befaced maint-6633: remove commented out code 2016-10-11 13:28:30 -07:00
Glenn Glazer 19f576872a maint-6633: space, the final frontier 2016-10-11 11:41:25 -07:00
Glenn Glazer e6043fad2a maint-6633: space after colon 2016-10-11 09:21:33 -07:00
Glenn Glazer f447cf7223 maint-6633: yet more futzing with spaces 2016-10-11 08:16:25 -07:00
Nat Goodspeed 704c53b3c5 MAINT-5232: Merge up to VLC viewer from viewer-release 2016-10-11 10:59:17 -04:00
Glenn Glazer 0a55b1d022 maint-6633: more futzing with spaces 2016-10-10 19:27:12 -07:00
Glenn Glazer 22ac9a10d8 maint-6633: fix spacing after level: 2016-10-10 16:03:10 -07:00
AndreyL ProductEngine 0f1d13fd4a Merged in lindenlab/viewer-bear 2016-10-11 01:21:12 +03:00
Glenn Glazer cea2e4a7ad maint-6633: fix spacing 2016-10-10 15:14:46 -07:00
Glenn Glazer acfbcc7352 maint-6633: move INFO around 2016-10-10 14:15:29 -07:00
Glenn Glazer c39b7f2d88 maint-6633: fix tyop 2016-10-10 13:37:42 -07:00
AndreyL ProductEngine 4617e07b37 Merged in lindenlab/viewer-release 2016-10-10 23:26:58 +03:00
Glenn Glazer 972b0b2f1b maint-6633: fix unit test to conform with new desired ordering 2016-10-10 12:31:01 -07:00
Glenn Glazer 64ab1979db maint-6633: fix ordering of log entries 2016-10-10 10:50:22 -07:00
Brad Payne (Vir Linden) 8d6bb9ee4e SL-451 - SSE-optimized matrix multiply, used in initSkinningMatrixPalette() 2016-09-28 15:43:07 -04:00
Mnikolenko Productengine b941de80db MAINT-6783 Xml parser warnings should show the file name 2016-09-30 11:21:22 +03:00
Nat Goodspeed d0249fb7c0 MAINT-5232: Eliminate pointless string search for "class " prefix.
The Visual C++ runtime produces typeid(MyClass).name() as "class MyClass".
It's prudent to check for the presence of that prefix before stripping off the
first six characters, but if the first comparison should ever fail, find()
would continue searching the rest of the string for "class " -- a search
guaranteed to fail. Use compare() instead.
2016-09-17 20:54:50 -04:00
Rider Linden 884b03e877 Merge 2016-09-16 14:43:35 -07:00
Nat Goodspeed d2c3c2f9fe MAINT-5232: Normalize LLSingleton subclasses.
A shocking number of LLSingleton subclasses had public constructors -- and in
several instances, were being explicitly instantiated independently of the
LLSingleton machinery. This breaks the new LLSingleton dependency-tracking
machinery. It seems only fair that if you say you want an LLSingleton, there
should only be ONE INSTANCE!

Introduce LLSINGLETON() and LLSINGLETON_EMPTY_CTOR() macros. These handle the
friend class LLSingleton<whatevah>;
and explicitly declare a private nullary constructor.

To try to enforce the LLSINGLETON() convention, introduce a new pure virtual
LLSingleton method you_must_use_LLSINGLETON_macro() which is, as you might
suspect, defined by the macro. If you declare an LLSingleton subclass without
using LLSINGLETON() or LLSINGLETON_EMPTY_CTOR() in the class body, you can't
instantiate the subclass for lack of a you_must_use_LLSINGLETON_macro()
implementation -- which will hopefully remind the coder.

Trawl through ALL LLSingleton subclass definitions, sprinkling in
LLSINGLETON() or LLSINGLETON_EMPTY_CTOR() as appropriate. Remove all explicit
constructor declarations, public or private, along with relevant 'friend class
LLSingleton<myself>' declarations. Where destructors are declared, move them
into private section as well. Where the constructor was inline but nontrivial,
move out of class body.

Fix several LLSingleton abuses revealed by making ctors/dtors private:

LLGlobalEconomy was both an LLSingleton and the base class for
LLRegionEconomy, a non-LLSingleton. (Therefore every LLRegionEconomy instance
contained another instance of the LLGlobalEconomy "singleton.") Extract
LLBaseEconomy; LLGlobalEconomy is now a trivial subclass of that.
LLRegionEconomy, as you might suspect, now derives from LLBaseEconomy.

LLToolGrab, an LLSingleton, was also explicitly instantiated by
LLToolCompGun's constructor. Extract LLToolGrabBase, explicitly instantiated,
with trivial subclass LLToolGrab, the LLSingleton instance.

(WARNING: LLToolGrabBase methods have an unnerving tendency to go after
LLToolGrab::getInstance(). I DO NOT KNOW what should be the relationship
between the instance in LLToolCompGun and the LLToolGrab singleton instance.)

LLGridManager declared a variant constructor accepting (const std::string&),
with the comment:
// initialize with an explicity grid file for testing.
As there is no evidence of this being called from anywhere, delete it.

LLChicletBar's constructor accepted an optional (const LLSD&). As the LLSD
parameter wasn't used, and as there is no evidence of it being passed from
anywhere, delete the parameter.

LLViewerWindow::shutdownViews() was checking LLNavigationBar::
instanceExists(), then deleting its getInstance() pointer -- leaving a
dangling LLSingleton instance pointer, a land mine if any subsequent code
should attempt to reference it. Use deleteSingleton() instead.

~LLAppViewer() was calling LLViewerEventRecorder::instance() and then
explicitly calling ~LLViewerEventRecorder() on that instance -- leaving the
LLSingleton instance pointer pointing to an allocated-but-destroyed instance.
Use deleteSingleton() instead.
2016-09-15 20:18:12 -04:00
Rider Linden 51236b7c9c Merge 2016-09-14 09:55:18 -07:00
Nat Goodspeed 1cadeb40df MAINT-5232: Prevent runaway LLSingletonBase::MasterList growth.
Until we reimplement LLCoros on Boost.Fiber, we must hand-implement
coroutine-local data. That presently takes the form of a map keyed on
llcoro::id, whose values are the stacks of currently-initializing LLSingleton
instances.

But since the viewer launches an open-ended number of coroutines, we could end
up with an open-ended number of map entries unless we intentionally prune the
map. So every time we pop the stack to empty, remove that map entry.

This could result in thrashing, a given coroutine's 'initializing' stack being
created and deleted for almost every LLSingleton instantiated by that
coroutine -- but the number of different LLSingletons is necessarily static,
and the lifespan of each is the entire rest of the process. Even a couple
dozen LLSingletons won't thrash that badly.
2016-09-06 21:25:57 -04:00
Nat Goodspeed 90f424980a MAINT-5232: Make LLSingleton's 'initializing' stack coro-specific.
The stack we maintain of which LLSingletons are currently initializing only
makes sense when associated with a particular C++ call stack. But each
coroutine introduces another C++ call stack!

Move the initializing stack from function-static storage to
LLSingletonBase::MasterList. Make it a map keyed by llcoro::id. Each coro then
has a stack of its own.

This introduces more dependencies on the MasterList singleton, requiring
additional LLSingleton_manage_master workarounds.
2016-09-06 21:07:38 -04:00
Nat Goodspeed 2d3c5fb060 Automated merge with ssh://bitbucket.org/lindenlab/viewer-vlc 2016-09-06 20:52:57 -04:00
Nat Goodspeed 67c401047a MAINT-5011: Ensure BlockTimer::mStartTime is unconditionally set.
Previous logic could possibly leave mStartTime uninitialized, producing fatal
warnings with gcc 4.7.
2016-09-06 20:48:16 -04:00
Nat Goodspeed a601c559e8 MAINT-5232: Ensure that llcoro::get_id() returns distinct values.
Until now, the "main coroutine" (the initial context) of each thread left
LLCoros::Current() NULL. The trouble with that is that llcoro::get_id()
returns that CoroData* as an opaque token, and we want distinct values for
every stack in the process. That would not be true if the "main coroutine" on
thread A returned the same value (NULL) as the "main coroutine" on thread B,
and so forth. Give each thread's "main coroutine" a dummy heap CoroData
instance of its own.
2016-09-06 12:08:38 -04:00
Oz Linden 5edd4cecfc merge changes for exception handling 2016-09-06 11:07:39 -04:00
Oz Linden 72f4c72001 downgrade spammy LLCoros logging to DEBUG 2016-09-06 10:21:28 -04:00
Oz Linden a5adabb4f6 add protections against failed memory allocations in VBO and aligned memory 2016-09-06 10:04:19 -04:00
Nat Goodspeed 976f4b6252 MAINT-5232: Break out LLCoros::get_id() into its own header file.
We need LLSingleton machinery to be able to reference get_id() without also
depending on all the rest of LLCoros -- since LLCoros isa LLSingleton.
2016-09-03 12:04:36 -04:00
Nat Goodspeed f931f6ef52 MAINT-5232: Add LLCoros::get_id() to identify the running coroutine.
Change the module-static thread_specific_ptr to a function-static
thread_specific_ptr so it will be initialized on demand -- since LLSingleton
will need to rely on get_id(). Note that since LLCoros isa LLSingleton, we
must take great care to avoid circularity.

Introduce a private helper class LLCoros::Current to obtain and bind that
thread_specific_ptr. Change all existing internal references from the static
thread_specific_ptr to the new Current helper class.
2016-09-03 11:39:17 -04:00
Nat Goodspeed c71e622229 MAINT-5232: Add DEBUG logging to LLSingleton dependency tracking.
Specifically, add DEBUG logging to the code that maintains the stack of
LLSingletons currently being initialized. This involves passing
LLSingletonBase's constructor the name of LLSingleton's template parameter
subclass, since during that constructor typeid(*this).name() will only produce
"LLSingletonBase".

Also add logdebugs() and oktolog() helper functions.
2016-09-03 11:30:53 -04:00
Nat Goodspeed 4af7e496b4 MAINT-5232: Make LLError::is_available() depend on both LLSingletons.
LLError machinery depends on two different LLSingletons. Its is_available()
function is primarily for LLSingleton itself to determine whether it is, or is
not, safe to log. Until both of LLError's LLSingletons have been constructed,
attempting to log LLSingleton operations could produce infinite recursion.
2016-09-03 11:22:54 -04:00
Nat Goodspeed a05ee7324d MAINT-5232: Abbreviate __FILE__ path in log_subsystem_cleanup().
LLError::abbreviateFile() is specifically to avoid cluttering log output with
the prefix of an absolute file path on the original build system, pointless
for anyone trying to read the log.
2016-09-02 14:03:28 -04:00
Nat Goodspeed 1804da89ee MAINT-5011: Abbreviate __FILE__ path in log_unhandled_exception_().
LLError::abbreviateFile() is specifically to avoid cluttering log output with
the prefix of an absolute file path on the original build system, pointless
for anyone trying to read the log.
2016-09-02 14:00:18 -04:00
Nat Goodspeed 56a83d2115 MAINT-5011: Use LL_VLOGS() rather than raw lllog() macro.
Raw lllog() doesn't work for varying log level, which is why LL_VLOGS()
exists.
2016-09-01 19:53:56 -04:00
Nat Goodspeed a1741be7f6 Automated merge with file:///Users/nat/linden/viewer-comment-lllog 2016-09-01 19:52:45 -04:00
Nat Goodspeed 1ed351e28f MAINT-5011: Use LL_VLOGS() rather than raw lllog() macro.
Raw lllog() doesn't work for varying log level, which is why LL_VLOGS()
exists.
2016-09-01 19:46:39 -04:00