summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthread.cpp
AgeCommit message (Collapse)Author
2021-06-07Merge branch 'master' into DRTVWR-516-maintAndrey Lihatskiy
2021-06-03SL-15272 Bugsplat crashes at condition wait()Andrey Kleshchev
Made sure all waits will be triggered, won't loop back and that in case of http queue it had some time to trigger
2020-10-08DRTVWR-510 remove all LL_SOLARIS conditionalsDave Houlton
2020-03-25DRTVWR-494: Use std::thread::id for LLThread::currentID().Nat Goodspeed
LLThread::currentID() used to return a U32, a distinct unsigned value incremented by explicitly constructing LLThread or by calling LLThread:: registerThreadID() early in a thread launched by other means. The latter imposed an unobvious requirement on new code based on std::thread. Using std::thread::id instead delegates to the compiler/library the problem of distinguishing threads launched by any means. Change lots of explicit U32 declarations. Introduce LLThread::id_t typedef to avoid having to run around fixing uses again if we later revisit this decision. LLMutex, which stores an LLThread::id_t, wants a distinguished value meaning NO_THREAD, and had an enum with that name. But as std::thread::id promises that the default-constructed value is distinct from every valid value, NO_THREAD becomes unnecessary and goes away. Because LLMutex now stores LLThread::id_t instead of U32, make llmutex.h #include "llthread.h" instead of the other way around. This makes LLMutex an incomplete type within llthread.h, so move LLThread::lockData() and unlockData() to the .cpp file. Similarly, remove llrefcount.h's #include "llmutex.h" to break circularity; instead forward-declare LLMutex. It turns out that a number of source files assumed that #include "llthread.h" would get the definition for LLMutex. Sprinkle #include "llmutex.h" as needed. In the SAFE_SSL code in llcorehttp/httpcommon.cpp, there's an ssl_thread_id() callback that returns an unsigned long to the SSL library. When LLThread:: currentID() was U32, we could simply return that. But std::thread::id is very deliberately opaque, and can't be reinterpret_cast to unsigned long. Fortunately it can be hashed because std::hash is specialized with that type.
2020-03-25DRTVWR-494: Add on_main_thread(), sibling to assert_main_thread().Nat Goodspeed
2019-01-15SL-10291 Replace apr thread with standard C++11 functionalityandreykproductengine
2019-01-14SL-10291 Replace apr_mutex with standard C++11 functionalityandreykproductengine
2018-08-21MAINT-5651 LLTrace issues on exitandreykproductengine
2018-02-22MAINT-8183 Fixed some exit issues and crashesandreykproductengine
2018-02-12Merged in lindenlab/viewer-releaseAndreyL ProductEngine
2018-01-29MAINT-8234 Mesh tread protections and removed unnecessary try in staticRun()Andrey Kleshchev
2018-01-17merge 5.1.0-releaseOz Linden
2017-08-08MAINT-7634: Logging and instrumentation canges to narrow down viewer crashes.Rider Linden
2017-04-14Change certificate store infrastructure to key off of the Subject KeyOz Linden
Id rather than sha1 hash, since that is rarely used in modern certs. The previous form was storing trusted certs using an empty sha1 hash value as the key, which meant most certificates matched... not good. Modify the LLCertException to pass certificate information back as LLSD rather than an LLPointer<LLCertificate>, because when the exception is being thown from the certificate constructor that results in one of a couple of other exceptions (even refcounting won't save you when the problem is that the thing you're pointing to never finished coming into being properly). Update the certificates in the llsechandler_basic_test to modern conventions, and extend the classes to allow for an optional validation date so that the test can use a fixed date. Also make all the certificates include the plain text form for ease of reference.
2016-04-22Windows: USe the correct datatypes when calling the Windows API.Nicky
(transplanted from 8b0c42b1a4f0416a17c8ec6078a85c5773f69a25)
2015-11-10remove execute permission from many files that should not have itOz Linden
2014-11-19OPEN-282 - Define LL_THREAD_LOCAL for our platforms in order to unify TLS ↵Cinder
support
2014-11-19OPEN-282 Use pthreads for TLS on macCinder
2014-02-24merge with releaseRichard Linden
2014-01-30fix for heap corruption crash on shutdownRichard Linden
don't set stopped flag until recorder object has been deleted
2013-12-10SH-4653 FIX Interesting: Viewer crashes while reading chat historyRichard Linden
fix for crash on exit resulting from 8c0e024d0c33
2013-12-10BUILDFIX: bad use of non static memberRichard Linden
2013-12-10SH-4653 FIX Interesting: Viewer crashes while reading chat historyRichard Linden
2013-12-05added some comments and changed calls from get_master_thread_recorder()Richard Linden
over to get_thread_recorder() to be agnostic about which thread we're running on
2013-10-11fixed legacy usage of llendlRichard Linden
2013-10-08merge from viewer-releaseRichard Linden
2013-10-04Merge. Pull in viewer-release after 3.6.7 release.Monty Brandenberg
2013-08-09second phase summer cleaningRichard Linden
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
2013-08-06SH-4411 Thread/mutex rework between main and worker threadMonty Brandenberg
Have the ::notifyLoadedMeshes() method doing correct locking and stall avoidance at the same time. This method now does lazy mutex lock acquisition (trylock()) and if it fails on either, it gives up and comes back later. Capture the maximum number of sequential failures and report this at the end of the run in the log. (So far, with big mesh regions, I've only seen 1s and 2s.) Locking/mutex requirements sorted in other locations as well. LLMutex gets trylock() method as well as new LLMutexTrylock scoped locking class. Clean up some documentation, more to do.
2013-07-18SH-4297 WIP interesting: viewer-interesting starts loading cached scene lateRichard Linden
fixed ostream precision munging in llsys
2013-07-15SH-4299Interesting: High fps shown temporarily off scale in statistics consoleRichard Linden
various fixes to lltrace start() on started recording no longer resets fixed various instances of unit forgetfullness in lltrace recording split now has gapless timing scene monitor now guarantees min sample time renamed a bunch of stats added names to debug thread view on windows
2013-07-01SH-4294 FIX Interesting: Statistics Texture cache hit rate is always 0%Richard Linden
also, removed LLTrace::init and cleanup removed derived class implementation of memory stat for LLMemTrackable is automatic now
2013-06-30fixed memory leak due to implementation of LLThreadLocalSingletonRichard Linden
removed LLThreadLocalSingleton collapsed all thread recorder classes to single type, LLTrace::ThreadRecorder moved fasttimer stack head to llthreadlocalsingletonpointer via ThreadRecorder
2013-06-22fixed scene load monitor resetting to eagerly due to spurious camer amotionRichard Linden
pulled swap() out of ui time block cleaned up internal lltrace dependencies, factored out common accumulator definitions
2013-06-05merge with viewer-releaseRichard Linden
2013-05-29SH-3931 WIP Interesting: Add graphs to visualize scene load metricsRichard Linden
fixed copy construction behavior of Recordings to not zero out data split measurement into event and sample, with sample representing a continuous function
2013-05-09Merge downstream code and viewer-betasimon
2013-04-17Some minor cleanups while hunting crashes. Reviewed by Kellysimon
2013-03-29Update Mac and Windows breakpad builds to latestGraham Madarasz
2013-02-28Attempt at a faster ThreadSafeRefCount classGraham Madarasz (Graham)
2012-12-05SH-3406 WIP convert fast timers to lltrace systemRichard Linden
changed thread id declaration to be local to llthread.cpp and use currentID() uniformly across platforms
2012-11-20SH-3406 WIP convert fast timers to lltrace systemRichard Linden
fixes to merge
2012-11-19merge with viewer-developmentRichard Linden
2012-10-10SH-3405 WIP convert existing stats to lltrace systemRichard Linden
fixed units conversion so that trace getters return convertable units removed circular dependencies from lltrace* converted more stats to lltrace
2012-10-02SH-3404 create sampler classRichard Linden
renamed LLTrace::ThreadTrace to LLTrace::ThreadRecorder renamed LLTrace::Sampler to LLTrace::Recording
2012-10-01SH-3275 WIP Run viewer metrics for object update messagesRichard Linden
cleaned up API samplers are now value types with copy-on-write buffers under the hood removed coupling with LLThread
2012-09-28SH-3275 WIP Run viewer metrics for object update messagesRichard Linden
created separate constructor for static allocation of sampler buffer fixed start/stop/resume semantics of samplers and added sampler time interval tracking
2012-09-26SH-3275 WIP Run viewer metrics for object update messagesRichard Linden
slave threads now pushing data to master thread
2012-09-26SH-3275 WIP Run viewer metrics for object update messagesRichard Linden
fixed various issues related to unit tests and LLThreadLocalPtr initialization and teardown
2012-09-24fixed buildRichard Linden
moved LLThread::lockData and unlockData back to header