summaryrefslogtreecommitdiff
path: root/indra/llcommon
AgeCommit message (Collapse)Author
2012-07-11MAINT-1175: Properly pass LLRegistry's COMPARATOR to underlying map.Nat Goodspeed
Although LLRegistry and LLRegistrySingleton have always defined a COMPARATOR template parameter, it wasn't used for the underlying map. Therefore every type, including any pointer type, was being compared using std::less. This happens to work most of the time -- but is tripping us up now. Pass COMPARATOR to underlying std::map. Fix a couple minor bugs in LLRegistryDefaultComparator (never before used!). Specialize for const char*. Remove CompareTypeID and LLCompareTypeID because we now actively forbid using LLRegistry<std::type_info*, ...>; remove only known reference (LLWidgetNameRegistry definition).
2012-07-11MAINT-1175: Change LLTypeInfoLookup API for future optimizations.Nat Goodspeed
Per discussion with Richard, accept the type key for insert() and find() as a template parameter rather than as std::type_info*. This permits (e.g.) some sort of compile-time prehashing for common types, without changing the API. Eliminate iterators from the API altogether, thus avoiding costs associated with transform_iterator. Fix existing references in llinitparam.h.
2012-07-11MAINT-1175: Forbid LLRegistry[Singleton]<std::type_info*, ...>.Nat Goodspeed
Back out code that selects LLTypeInfoLookup for the underlying map implementation when KEY = [const] std::type_info*, because LLTypeInfoLookup's API is changing to become incompatible with std::map. Instead, fail with STATIC_ASSERT when LLRegistry's KEY is [const] std::type_info*. Fix all existing uses to use std::type_info::name() string instead.
2012-07-10MAINT-1175: Still grappling with MSVC idiosyncracies.Nat Goodspeed
Maybe it's failing to correctly handle overloaded transform() methods?
2012-07-10MAINT-1175: Fix Windows build.Nat Goodspeed
It seems MSVC doesn't like boost::make_transform_iterator() in the context I was using it. Try directly invoking the iterator's constructor.
2012-07-10MAINT-1175: Reimplement LLTypeInfoLookup for better lookup failure.Nat Goodspeed
The original LLTypeInfoLookup implementation was based on two assumptions: small overall container size, and infrequent normal-case lookup failures. Those assumptions led to binary-searching a sorted vector, with linear search as a fallback to cover the problem case of two different type_info* values for the same type. As documented in the Jira, this turned out to be a problem. The container size was larger than expected, and failed lookups turned out to be far more common than expected. The new implementation is based on a hash map of std::type_info::name() strings, which should perform equally well in the success and failure cases: no special-case fallback logic.
2012-07-02Merge 3.3.3 release with Drano HTTP library at 3.3.0Monty Brandenberg
Big delta was converting the new texture debugger support code to the new library. Viewer manifest should probably get an eyeball before release.
2012-06-29Merge simon/viewmaster-merge for latest maint worksimon@Simon-PC.lindenlab.com
2012-06-28MergeDave Parks
2012-06-28mergeDave Parks
2012-06-27MAINT-1173 : Top Scripts: Break down usage by parcel. Follow-on code to addsimon@Simon-PC.lindenlab.com
per-parcel filtering. Reviewed by Kelly
2012-06-27merge changes for DRTVWR-167Oz Linden
2012-06-26merge to latest viewer-development-havokaiOz Linden
2012-06-25PATH-743: Updating the cursors for path testing mode to final designs.Todd Stinson
2012-06-25merge up to 3.3.3-release + pathfindingOz Linden
2012-06-25increment version to 3.3.5Oz Linden
2012-06-24Add logging during tests (debug level, to test-specific files)Oz Linden
2012-06-22Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-release.Todd Stinson
2012-06-22mergeBrad Payne (Vir Linden)
2012-06-22mergeDave Parks
2012-06-21PATH-743: Altering the mouse cursor to give more feed back when in path ↵Todd Stinson
testing mode.
2012-06-21merge changes for DRTVWR-168Oz Linden
2012-06-15MergeDave Parks
2012-06-14LLMutex recursive lock, global & per-request tracing, simple GET request, ↵Monty Brandenberg
LLProxy support, HttpOptions starting to work, HTTP resource waiting fixed. Non-LLThread-based threads need to do some registration or LLMutex locks taken out in these threads will not work as expected (SH-3154). We'll get a better solution later, this fixes some things for now. Tracing of operations now supported. Global and per-request (via HttpOptions) tracing levels of [0..3]. The 2 and 3 levels use libcurl's VERBOSE mode combined with CURLOPT_DEBUGFUNCTION to stream high levels of detail into the log. *Very* laggy but useful. Simple GET request supported (no Range: header). Really just a degenrate case of a ranged get but supplied an API anyway. Global option to use the LLProxy interface to setup CURL handles for either socks5 or http proxy usage. This isn't really the most encapsulated way to do this but a better solution will have to come later. The wantHeaders and tracing options are now supported in HttpOptions giving per-request controls. Big refactoring of the HTTP resource waiter in lltexturefetch. What I was doing before wasn't correct. Instead, I'm implementing the resource wait after the Semaphore model (though not using system semaphores). So instead of having a sequence like: SEND_HTTP_REQ -> WAIT_HTTP_RESOURCE -> SEND_HTTP_REQ, we now do WAIT_HTTP_RESOURCE -> WAIT_HTTP_RESOURCE2 (actual wait) -> SEND_HTTP_REQ. Works well but the prioritized filling of the corehttp library needs some performance work later.
2012-06-12Convert _refcounted.h over to using LLAtomic32<>.Monty Brandenberg
Beware of bad documentation. operator--(int) does not return what the header claimed it did.
2012-06-08merge changes for DRTVWR-164Oz Linden
2012-06-06MAINT-1144: Defend against NULL LLPluginProcessParent::mProcess.Nat Goodspeed
The change from LLProcessLauncher to LLProcess introduces the possibility of a NULL (default-constructed) LLProcessPtr. Add certain static LLProcess methods accepting LLProcessPtr, forwarding to nonstatic method when non-NULL but doing something reasonable with NULL. Use these methods in LLPLuginProcessParent.
2012-06-04mergeBrad Payne (Vir Linden)
2012-06-01Platform fixups Linux: unused variables, make error strings constant.Monty Brandenberg
2012-05-31WIP:Displaying physics capsule for a character - it is currently disabled.prep
2012-07-12Crashfix: in ll_safe_string not only guard against 0 pointer, but against ↵Nicky
illegal length of buffer too.
2012-05-29increment viewer version to 3.3.4Oz Linden
2012-05-24merge changes for DRTVWR-151Oz Linden
2012-05-20Merged with viewer-betaKitty Barnett
2012-05-18PATH-638: Adding elements to render the new sim stats.Todd Stinson
2012-05-09Automated merge with http://hg.secondlife.com/viewer-releaseNat Goodspeed
2012-05-09CHOP-900: Use new apr_procattr_constrain_handle_set() extension.Nat Goodspeed
Now LLProcess explicitly requests APR to limit the handles passed to any child process, instead of wantonly passing whatever happens to be lying around the parent process at the time. This requires the latest APR build. Also revert LLUpdateDownloader::Implementation::mDownloadStream to llofstream (as in rev 1878a57aebd7) instead of apr_file_t*. Using APR for that file was a Band-Aid -- a single whacked mole -- for the problem more systemically addressed by apr_procattr_constrain_handle_set().
2012-05-08merge changes for version 3.3.1Oz Linden
2012-05-07Build llcorehttp as part of a viewer dependency with unit tests. This requiredMonty Brandenberg
boost::thread and the easiest path to that was to go with the 1.48 Boost release in the 3P tree (eliminating a fork for a modified 1.45 packaging). One unit test, the most important one, is failing in test_httprequest but that can be attended to later. This test issues a GET to http://localhost:2/ and that is hitting the wire but the libcurl plumbing isn't delivering the failure, only the eventual timeout. An unexpected change in behavior.
2012-05-04Altering the build headers such that I can use llinfos in the ↵Todd Stinson
llphysicsextension library.
2012-05-04increment viewer version to 3.3.3Oz Linden
2012-04-25Removing windows line endings from .h and .cpp files.Todd Stinson
2012-04-23IQA-463: Use APR file I/O for downloaded viewer installer .exe.Nat Goodspeed
On Windows, calling CreateProcess(bInheritHandles=FALSE) is the wrong idea. In that case, CreateProcess() passes NO handles -- even the files you've explicitly designated as the child's stdin, stdout, stderr in the STARTUPINFO struct! Remove LLProcess code to tweak bInheritHandles; we should also remove the corresponding (useless) APR extension. Instead, given that the Windows file-locking problem we've observed is specific to the viewer installer .exe file downloaded by the background updater logic, use APR file I/O for that specific file. Empirically, both llofstream and std::ofstream seem to make the open file handle inheritable; but apr_file_open() documentation says: "By default, the returned file descriptor will not be inherited by child processes created by apr_proc_create()." And indeed, it does appear to sidestep the locking problem.
2012-04-23IQA-463: LLError::addRecorder() claims ownership of passed Recorder*.Nat Goodspeed
That is, when the underlying LLError::Settings object is destroyed -- possibly at termination, possibly on LLError::restoreSettings() -- the passed Recorder* is deleted. There was much existing code that seemed as unaware of this alarming fact as I was myself. Passing to addRecorder() a pointer to a stack object, or to a member of some other object, is just Bad. It might be preferable to make addRecorder() accept std::auto_ptr<Recorder> to make the ownership transfer more explicit -- or even boost::shared_ptr<Recorder> instead, which would allow the caller to either forget or retain the passed Recorder. This preliminary pass retains the Recorder* dumb pointer API, but documents the ownership issue, and eliminates known instances of passing pointers to anything but a standalone heap Recorder subclass object.
2012-04-18IQA-463: Make LLProcess call apr_procattr_inherit_set() extension.Nat Goodspeed
On Windows, Bad Things happen when apr_proc_create() is allowed to pass TRUE to CreateProcess(bInheritHandles). For instance, the open handle for a new installer executable file being downloaded by the background updater gets inadvertently passed to a couple slplugin.exe instances. When the viewer finishes downloading, closes the file and tries to remove it, Windows balks because the file is still open by another process. Require an apr_suite package that includes the new Linden apr_procattr_inherit_set() extension, and call it to turn off CreateProcess(bInheritHandles).
2012-04-18IQA-463: Add error logging for certain LLFile operations.Nat Goodspeed
Attempting to debug an observed LLFile::remove() failure, I was floored to find that remove() made no attempt whatsoever to report its lack of success! Add warnif() function to log errno text in platform-dependent way. Support the notion that for some functions, certain errno values are acceptable -- e.g. we expect stat() to frequently hit ENOENT -- and need not be logged. Add commented-out Windows-specific logic to try to provide further information in the case of EACCES ("Permission denied," e.g. another process has the file open). To use, enable the code block, download handle.exe and turn on DEBUG logging for LLFile. handle.exe can be obtained from: http://technet.microsoft.com/en-us/sysinternals/bb896655
2012-04-12Fix misleading comments, per Richard's code review.Nat Goodspeed
2012-04-11Refining the behavior of the pathing test tool behavior with regards to ↵Todd Stinson
mouse clicks.
2012-04-11Merge daggy fix c167ae699e17 for Linux UI issues.Nat Goodspeed
2012-04-11Fix Linux UI issues introduced by moving llinitparam to llcommon.Nat Goodspeed
In a number of places, the viewer uses a lookup based on std::type_info*. We used to use std::map<std::type_info*, whatever>. But on Linux, &typeid(SomeType) can produce different pointer values, depending on the dynamic load module in which the code is executed. Introduce LLTypeInfoLookup<T>, with an API that deliberately mimics std::map<std::type_info*, T>. LLTypeInfoLookup::find() first tries an efficient search for the specified std::type_info*. But if that fails, it scans the underlying container for a match on the std::type_info::name() string. If found, it caches the new std::type_info* to optimize subsequent lookups with the same pointer. Use LLTypeInfoLookup instead of std::map<std::type_info*, ...> in llinitparam.h and llregistry.h. Introduce LLSortedVector<KEY, VALUE>, a std::vector<std::pair<KEY, VALUE>> maintained in sorted order with binary-search lookup. It presents a subset of the std::map<KEY, VALUE> API.