Commit Graph

131 Commits (5564fcb271d993b1b8a98fae7f832f47f1236fd4)

Author SHA1 Message Date
Richard Linden 5564fcb271 SH-3275 WIP Run viewer metrics for object update messages
clean up of llstats stuff
2012-07-16 19:15:46 -07:00
Brad Payne (Vir Linden) 9f000e4b34 SH-3153 FIX 2012-06-08 15:49:11 -04:00
simon@Simon-PC.lindenlab.com 1777fa5187 Merge pull from lindenlab/viewer-development as requested by Oz for DRTVWR-148 2012-05-25 15:07:22 -07:00
Brad Payne (Vir Linden) c4dfdcb338 partial fix for SH-3132 - reduce max concurrent http requests to same level as in release 2012-05-14 18:02:53 -04:00
Xiaohong Bao aa44ec81e1 for SH-3118: add a toggle "TextureFetchDebuggerEnabled" to turn the console on and off. 2012-05-01 16:49:28 -06:00
Xiaohong Bao 9c4380a03a fix a crash on cache write 2012-04-27 14:27:48 -06:00
Xiaohong Bao ed78cc0000 fix some flaws for SH-3104 2012-04-27 12:43:14 -06:00
Merov Linden 793d8a4f62 Pull merge from drano-sh-3086 2012-04-27 00:00:07 -07:00
Merov Linden e1ddeb5364 SH-3104 : Implemented HTTP bulk fetch for texture debug console 2012-04-26 23:55:40 -07:00
Xiaohong Bao e344b2afa2 For SH-3121: collect time of reloading all textures from cache and through HTTP when all objects loading are done. 2012-04-26 15:53:35 -06:00
Xiaohong Bao 5ab4dadc70 for subtasks SH-3118, SH-3112, SH-3110, SH-3106, SH-3091 for SH-3086:
As a viewer architect, I would like to understand how fast each of the components of the texture pipeline can run in isolation
2012-04-25 16:59:20 -06:00
Merov Linden adf5b5c1ef Final pull from viewer-thx1138 2012-04-13 17:20:53 -07:00
Xiaohong Bao 0a42495906 for SH-3074: clear ghost and stale texture fetching requests in time 2012-04-12 15:50:25 -06:00
callum ac50379957 SH-3065 FIX Investigate fixes for out-of-order operations on startup
Reviewed by Simon
2012-04-12 11:55:37 -07:00
Xiaohong Bao 6eb53b7c42 For SH-3071: Increase HTTP concurrency to improve texture fetching performance 2012-04-03 16:02:36 -06:00
Brad Payne (Vir Linden) 3215c6c4ca merge viewer-thx-runway-shared-1 to runway 2012-03-19 16:31:58 -04:00
Brad Payne (Vir Linden) b98b4ee168 SH-2970 WIP - pretty-print some metrics for more readable log 2012-03-15 17:10:31 -04:00
Richard Linden 3672956f0d added stats tracking for texture/object cache hit rates and texture cache read latency 2012-03-15 11:57:29 -07:00
Dave Parks 78233d1bf9 SH-2652 WIP -- Add timers to relevant areas, pause render pipeline while occlusion queries from previous frame are still pending and perform texture decode work. 2011-12-05 17:55:40 -06:00
Dave Parks c0ca8e5e2e Merge backout of b782a75c99e6 2011-10-14 11:58:35 -05:00
Dave Parks 4331c112ab Backed out changeset b782a75c99e6 2011-10-14 11:52:40 -05:00
Xiaohong Bao 5ef05e151d fix for SH-2434: Mac viewer sometimes freezes at start up and must be force quit. 2011-10-05 15:21:10 -06:00
Xiaohong Bao b594d3b04d add debug mode to track the memory allocation/deallocation. 2011-05-10 21:02:20 -06:00
Xiaohong Bao 29415d1407 Merge 2011-02-23 13:48:35 -07:00
Xiaohong Bao 01cdeb0cdd Merge from viewer-development 2011-02-23 10:44:59 -07:00
Aleric Inglewood ef490e308c Introduces a LLThreadLocalData class that can be
accessed through the static LLThread::tldata().
Currently this object contains two (public) thread-local
objects: a LLAPRRootPool and a LLVolatileAPRPool.

The first is the general memory pool used by this thread
(and this thread alone), while the second is intended
for short lived memory allocations (needed for APR).
The advantages of not mixing those two is that the latter
is used most frequently, and as a result of it's nature
can be destroyed and reconstructed on a "regular" basis.

This patch adds LLAPRPool (completely replacing the old one),
which is a wrapper around apr_pool_t* and has complete
thread-safity checking.

Whenever an apr call requires memory for some resource,
a memory pool in the form of an LLAPRPool object can
be created with the same life-time as this resource;
assuring clean up of the memory no sooner, but also
not much later than the life-time of the resource
that needs the memory.

Many, many function calls and constructors had the
pool parameter simply removed (it is no longer the
concern of the developer, if you don't write code
that actually does an libapr call then you are no
longer bothered with memory pools at all).

However, I kept the notion of short-lived and
long-lived allocations alive (see my remark in
the jira here: https://jira.secondlife.com/browse/STORM-864?focusedCommentId=235356&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-235356
which requires that the LLAPRFile API needs
to allow the user to specify how long they
think a file will stay open. By choosing
'short_lived' as default for the constructor
that immediately opens a file, the number of
instances where this needs to be specified is
drastically reduced however (obviously, any
automatic LLAPRFile is short lived).

***

Addressed Boroondas remarks in https://codereview.secondlife.com/r/99/
regarding (doxygen) comments. This patch effectively only changes comments.

Includes some 'merge' stuff that ended up in llvocache.cpp
(while starting as a bug fix, now only resulting in a cleanup).

***

Added comment 'The use of apr_pool_t is OK here'.

Added this comment on every line where apr_pool_t
is correctly being used.

This should make it easier to spot (future) errors
where someone started to use apr_pool_t; you can
just grep all sources for 'apr_pool_t' and immediately
see where it's being used while LLAPRPool should
have been used.

Note that merging this patch is very easy:
If there are no other uses of apr_pool_t in the code
(one grep) and it compiles, then it will work.

***

Second Merge (needed to remove 'delete mCreationMutex'
from LLImageDecodeThread::~LLImageDecodeThread).

***

Added back #include <apr_pools.h>.

Apparently that is needed on libapr version 1.2.8.,
the version used by Linden Lab, for calls to
apr_queue_*. This is a bug in libapr (we also
include <apr_queue.h>, that is fixed in (at least) 1.3.7.

Note that 1.2.8 is VERY old. Even 1.3.x is old.

***

License fixes (GPL -> LGPL). And typo in comments.
Addresses merov's comments on the review board.

***

Added Merov's compile fixes for windows.
2011-02-05 15:58:07 +01:00
Oz Linden 2e2d990eb1 correct DOS line endings 2011-01-29 13:09:55 -05:00
Xiaohong Bao 4af7e9eb64 Merge viewer-development-shining up to REV 3bf724ecb7c6 (fix for SH-829: Viewer attempting to load precached images in file types that are not being used.) 2011-01-21 16:25:23 -07:00
Xiaohong Bao 611d8bdf61 use the private pool in the texture pipeline 2011-01-06 16:20:21 -07:00
Monty Brandenberg 3c05ebd286 ESC-237 No static init of LLAtomics and move TFRequest out of unnamed namespace.
Linux startup crash appears to be due to static/global C++ init of LLAtomic
types.  The initializer with explicit value makes some runtime calls and it
looks like these assume, at least on Linux, that apr_initialize() has been
called.  So move the static POST count to a member and provide accessors
and increment/decrement.  Command queue was built on a pointer to a class
in anonymous namespace and that's not quite valid.  Made it a nested
class (really a nested forward declaration) while keeping the derived
classes in anonymous.
2010-12-16 16:42:26 -08:00
Monty Brandenberg de8fa40209 ESC-235 Truncation of over-sized metrics reports wasn't working.
Legacy of the LLSD::Map-to-LLSD::Array conversion, this ended up
performing an erase on the array rather than the map taking out
all the regions.  So, there *was* a metrics report, it was just empty
of regions.  Fixed and scanned for more array/map problems and
corrected the data type for duration sorts (should have been Real).
2010-12-15 15:50:09 -05:00
Xiaohong Bao dc75235e38 debug code for SH-639: http requests 3X more in viewer 2.4 2010-12-13 21:09:52 -07:00
Monty Brandenberg 622c9f772c Cleanup a cross-thread command dtor. It was technically
correct but looked a bit dodgy with pointer ownership.
2010-12-13 11:17:41 -05:00
Monty Brandenberg bb53d27b7a ESC-211 ESC-212 Use arrays in payload to grid and compact payload
First, introduced a compact payload format that allows blocks of
metrics to be dropped from the viewer->collector payload compressing
1200 bytes of LLSD into about 300, give-or-take.  Then converted
to using LLSD arrays in the payload to enumerate the regions
encountered.  This simplifies much data handling from the viewer
all the way into the final formatter of the metrics on the grid.
2010-12-11 16:16:07 -05:00
Monty Brandenberg 11d420dd32 Decided to refactor a bit. Was using LLSD as an internal data
representation transferring ownership, doing data aggregation
in a very pedantic way.  That's just adding unneeded cost and
complication.  Used the same objects to transport data as are
collecting it and everything got simpler, faster, easier to
read with fewer gotchas.  Bit myself *again* doing the min/max/mean
merges but the unittests where there to pick me up again.  Added
a per-region FPS metric while I was at it.  This is much asked
for and there was a convenient place to sample the value.
2010-12-10 17:41:05 -08:00
Monty Brandenberg b9cf73c29b merge from http://hg.secondlife.com/viewer-development 2010-12-09 11:07:50 -05:00
Monty Brandenberg ca76c55847 ESC-211 ESC-222 Viewer/Sim comms and outbound data throttle
Cleaned up some of the messaging code that sends the LLSD stats
report off to the viewer.  Added WARNS-level messages when there's
a problem with delivery that will result in a data break.  Users
probably won't care.  Added an outbound data throttle that limits
stats to the 10 regions of longest occupancy.  Should be a
reasonable first cut.
2010-12-03 12:31:12 -08:00
Monty Brandenberg 922b1f26b7 ESC-211 Metrics data sink - fix delivery by viewer
The TextureFetch thread was still stalling out due to
a different path that determines whether there is work
or not in the thread (uses getPending()) and that had
to be harmonized with the changes to runCondition().
I'm not happy with this solution but a refactor of the
LLThread tree isn't in the cards right now.
2010-12-02 18:42:47 -05:00
Monty Brandenberg 0f2ed092c5 ESC-154 ESC-156 Now using region hash rather than region uuid as identifier.
In the viewer, the region's UUID is acquired very late and isn't generally
used as the canonical region identifier.  The U64 region hash is a better
and more consistently used identifier so I'm moving over to using that as
the region key.  Don't have a proper reserved invalid region hash which is
unfortunate, but then, so much is.
2010-11-29 08:31:08 -08:00
Monty Brandenberg a4bf732289 ESC-154 ESC-155 Viewer metrics fixes for min/max merged values, floating timestamps.
The min/max response time calculations needed to be sensitive to the response
counts to know if their was actual data.  Failure to do so introduced a
gratuitous min/max test against zero values which tended to corrupt the
mins.  Unit tests added to test for this condition.  Finished conversion
of times to floating point seconds.  Removed two logging events used to
debug the cross-thread messaging.  Looks like a code completion point.
2010-11-24 15:02:46 -08:00
Monty Brandenberg 0fd80d0997 ESC-154 ESC-156 Metrics integration across threads
Using unpause() method in derived class rather than wake() in furthest base class
solved the stalling problem.  I still think too many levels of the
LLTextureFetch hierarchy are keeping thread state, however.  The
LLViewerRegion instance an agent enters doesn't necessarily have its
region_id yet, that only comes after the handshake, if any.  So add
a few more metrics insertion points to propagate region into metrics.
Finally, try to launch a final metrics report when a quit is initiated.
2010-11-24 16:46:40 -05:00
Monty Brandenberg 3962b155b4 ESC-154 ESC-156 Integrating metrics collector into viewer.
After discussions, renamed 'QAModeMetricsSubmetrics' to 'QAModeMetrics'
and confirmed that LLCachedControl<> is the way to go.  Moved the
resulting flag out of LLViewerAssetStats (where it didn't belong)
and it lives in both LLAppViewer and LLTextureFetch where it does
belong.
2010-11-23 12:29:15 -08:00
Monty Brandenberg 9ec3334184 ESC-154 ESC-156 Data collection and control for viewer metrics
Detect QAMode (and new QAModeMetricsSubmode) settings which
enable logging of metrics report locally and a faster cycle
time to reduce test waiting.  Do this only in the main thread
and propagate the result via collector constructors (will
likely move that out and put it in llappviewer/lltexturefetch
which is more correct scope).  Managed to deadlock myself with
a recursive mutex (sheesh).
2010-11-23 13:31:22 -05:00
Monty Brandenberg f98a622325 ESC-154 ESC-156 Metrics integration into viewer's threads
Removed declared but undefined interfaces from LLTextureFetch family.
Had inserted the cross-thread command processor into some of
LLTextureFetchWorker's processing which was unnatural and
probably wrong.  Moved it to LLTextureFetch which turned out to
be far, far more natural.  Better documentation on the asLLSD()
format.  Refined LLSD stats merger logic and enhanced unit
tests to verify same.
2010-11-22 10:26:25 -08:00
Monty Brandenberg a99db82e9b ESC-155 Multi-threaded umbrella collector for stats aggregation
Code complete with the intelligence to merge counts, mins,
maxes and means with reasonable defences.  Added QAMode
controls to the viewer so that we can QA this more quickly
by reducing the timing interval and sending the metrics
body to local logging as well as to the caps service.
2010-11-19 15:14:40 -08:00
Monty Brandenberg d666a3d92c ESC-154 ESC-155 ESC-156
Asset fetch requests wrapped to allow for measurements.
Asset fetch enqueues, dequeues and completion times recorded
to asset stats collector.  Texture fetch operations (http
and udp) recorded to asset stats collector.  Stats collector
time vallue switched from F32 to U64 which is the more common
type in the viewer.  Cross-thread mechanism introduced to
communicate region changes and generate global statistics
messages.  Facility to deliver metrics via Capabilities
sketched in but needs additional work.  Documentation and
diagrams added.
2010-11-18 08:43:09 -08:00
Merov Linden f7af29ab40 merge with viewer-development 2010-11-04 14:30:32 -07:00
Merov Linden e3ecffc180 Pull update from viewer-development 2010-10-12 16:08:31 -07:00
Xiaohong Bao 2f29c35114 fix for SH-173/VWR-22868: Development Viewer freezes just after startup / greedy with file handles / 'WARNING: ll_apr_warn_status: APR: Too many open files'
(transplanted from a9aefa70c029eb9dddec3833d0ce22ef4b4421b5)
2010-09-22 14:44:40 -06:00
Xiaohong Bao dfe1274552 fix for SH-173/VWR-22868: Development Viewer freezes just after startup / greedy with file handles / 'WARNING: ll_apr_warn_status: APR: Too many open files' 2010-09-22 14:44:40 -06:00