Commit Graph

102 Commits (ba30737d8f4add8ddd8c77d18df6497b46583fe9)

Author SHA1 Message Date
Andrey Kleshchev 6e65c3821e #4319 Thread crashes not being reported to bugsplat 2025-07-08 00:00:14 +03:00
Rye Mutt 86668633c3 Fix failure to join or detach threads causing rare shutdown termination 2024-08-01 17:54:25 +03:00
Rye Mutt 2a7030992f
Update tracy profiler to 0.10 (#1946) 2024-07-09 16:53:43 -05:00
Brad Linden a1f49564d6 Merge remote-tracking branch 'origin/DRTVWR-600-maint-A' into brad/merge-maint-a-to-dev 2024-05-23 11:31:19 -07:00
Ansariel e2e37cced8 Fix line endlings 2024-05-22 22:40:26 +03:00
Ansariel 1b67dd855c Merge remote-tracking branch 'origin/main' into DRTVWR-600-maint-A
# Conflicts:
#	autobuild.xml
#	indra/cmake/CMakeLists.txt
#	indra/cmake/GoogleMock.cmake
#	indra/llaudio/llaudioengine_fmodstudio.cpp
#	indra/llaudio/llaudioengine_fmodstudio.h
#	indra/llaudio/lllistener_fmodstudio.cpp
#	indra/llaudio/lllistener_fmodstudio.h
#	indra/llaudio/llstreamingaudio_fmodstudio.cpp
#	indra/llaudio/llstreamingaudio_fmodstudio.h
#	indra/llcharacter/llmultigesture.cpp
#	indra/llcharacter/llmultigesture.h
#	indra/llimage/llimage.cpp
#	indra/llimage/llimagepng.cpp
#	indra/llimage/llimageworker.cpp
#	indra/llimage/tests/llimageworker_test.cpp
#	indra/llmessage/tests/llmockhttpclient.h
#	indra/llprimitive/llgltfmaterial.h
#	indra/llrender/llfontfreetype.cpp
#	indra/llui/llcombobox.cpp
#	indra/llui/llfolderview.cpp
#	indra/llui/llfolderviewmodel.h
#	indra/llui/lllineeditor.cpp
#	indra/llui/lllineeditor.h
#	indra/llui/lltextbase.cpp
#	indra/llui/lltextbase.h
#	indra/llui/lltexteditor.cpp
#	indra/llui/lltextvalidate.cpp
#	indra/llui/lltextvalidate.h
#	indra/llui/lluictrl.h
#	indra/llui/llview.cpp
#	indra/llwindow/llwindowmacosx.cpp
#	indra/newview/app_settings/settings.xml
#	indra/newview/llappearancemgr.cpp
#	indra/newview/llappearancemgr.h
#	indra/newview/llavatarpropertiesprocessor.cpp
#	indra/newview/llavatarpropertiesprocessor.h
#	indra/newview/llbreadcrumbview.cpp
#	indra/newview/llbreadcrumbview.h
#	indra/newview/llbreastmotion.cpp
#	indra/newview/llbreastmotion.h
#	indra/newview/llconversationmodel.h
#	indra/newview/lldensityctrl.cpp
#	indra/newview/lldensityctrl.h
#	indra/newview/llface.inl
#	indra/newview/llfloatereditsky.cpp
#	indra/newview/llfloatereditwater.cpp
#	indra/newview/llfloateremojipicker.h
#	indra/newview/llfloaterimsessiontab.cpp
#	indra/newview/llfloaterprofiletexture.cpp
#	indra/newview/llfloaterprofiletexture.h
#	indra/newview/llgesturemgr.cpp
#	indra/newview/llgesturemgr.h
#	indra/newview/llimpanel.cpp
#	indra/newview/llimpanel.h
#	indra/newview/llinventorybridge.cpp
#	indra/newview/llinventorybridge.h
#	indra/newview/llinventoryclipboard.cpp
#	indra/newview/llinventoryclipboard.h
#	indra/newview/llinventoryfunctions.cpp
#	indra/newview/llinventoryfunctions.h
#	indra/newview/llinventorygallery.cpp
#	indra/newview/lllistbrowser.cpp
#	indra/newview/lllistbrowser.h
#	indra/newview/llpanelobjectinventory.cpp
#	indra/newview/llpanelprofile.cpp
#	indra/newview/llpanelprofile.h
#	indra/newview/llpreviewgesture.cpp
#	indra/newview/llsavedsettingsglue.cpp
#	indra/newview/llsavedsettingsglue.h
#	indra/newview/lltooldraganddrop.cpp
#	indra/newview/llurllineeditorctrl.cpp
#	indra/newview/llvectorperfoptions.cpp
#	indra/newview/llvectorperfoptions.h
#	indra/newview/llviewerparceloverlay.cpp
#	indra/newview/llviewertexlayer.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/macmain.h
#	indra/test/test.cpp
2024-05-22 19:04:52 +02:00
RunitaiLinden c6d752b880 Merge remote-tracking branch 'origin/DRTVWR-600-maint-A' into gltf-dev-maint-a-merge 2024-05-06 16:48:58 -05:00
RunitaiLinden 7fc5f7e649
#1354 Make coroutines use LLCoros::Mutex instead of LLMutex (#1356)
* #1354 Make coroutines use LLCoros::Mutex instead of LLMutex

* #1354 Fix some more unsafe coroutine executions.

* #1354 Implement changes requested by Nat
2024-05-02 10:57:39 -05:00
Andrey Lihatskiy 1b68f71348 #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed 2024-04-29 07:56:09 +03:00
Ansariel d0102af56d Merge branch 'main' of https://github.com/secondlife/viewer into DRTVWR-600-maint-A
# Conflicts:
#	indra/llcommon/llapp.cpp
#	indra/llcommon/llapp.h
#	indra/llimage/llimageworker.cpp
#	indra/llui/llcontainerview.cpp
#	indra/llui/llcontainerview.h
#	indra/llui/llkeywords.cpp
#	indra/llui/lltabcontainer.cpp
#	indra/llui/lltextbase.cpp
#	indra/newview/llappviewer.cpp
#	indra/newview/llfavoritesbar.cpp
#	indra/newview/llfavoritesbar.h
#	indra/newview/llfloaterimnearbychathandler.cpp
#	indra/newview/llfloaterpreference.cpp
#	indra/newview/llhudnametag.h
#	indra/newview/llinventorypanel.cpp
#	indra/newview/llinventorypanel.h
#	indra/newview/llmeshrepository.cpp
#	indra/newview/lloutfitgallery.cpp
#	indra/newview/lloutfitslist.cpp
#	indra/newview/llpaneleditwearable.cpp
#	indra/newview/llpanelprofilepicks.cpp
#	indra/newview/llpanelvoicedevicesettings.h
#	indra/newview/llpreviewscript.cpp
#	indra/newview/llpreviewscript.h
#	indra/newview/llselectmgr.cpp
#	indra/newview/lltranslate.cpp
#	indra/newview/llviewerassetupload.cpp
#	indra/newview/llviewermessage.cpp
2024-04-11 21:59:38 +02:00
Lars Næsbye Christensen ba4e7b989b llcommon: BOOL (int) to real bool/LSTATUS 2024-02-09 01:02:29 +02:00
Nat Goodspeed fea1d9f4d2 SL-20546: Merge branch 'DRTVWR-588-maint-W' into sl-20546. 2024-01-18 13:15:32 -05:00
Nat Goodspeed 5fa7f69101 SL-20546: Defend llrand's random generator against concurrent access
by making it thread_local.
2023-11-17 14:31:21 -05:00
Dave Parks 87bb72a47a SL-18154 WIP -- CPU sampling (AMD uProf) profile guided optimizations to reduce CPU usage of background threads. 2022-11-30 13:25:00 -06:00
Ptolemy b504c69255 SL-16606: Add profiler category THREAD 2022-01-14 11:50:21 -08:00
Dave Parks 675514bdb3 SL-16093 Don't force the console window to be open on developer builds because it causes frame stalls while logging. 2021-09-27 23:56:06 +00:00
Ptolemy df5127136f SL-15709: Add Tracy support to viewer 2021-09-03 17:53:43 -07:00
Andrey Lihatskiy fef6c1f51e Merge branch 'master' into DRTVWR-516-maint 2021-06-07 20:54:41 +03:00
Andrey Kleshchev 823f97ac59 SL-15272 Bugsplat crashes at condition wait()
Made sure all waits will be triggered, won't loop back and that in case of http queue it had some time to trigger
2021-06-03 21:31:30 +03:00
Dave Houlton 7cd076c796 DRTVWR-510 remove all LL_SOLARIS conditionals 2020-10-08 17:16:22 -06:00
Nat Goodspeed 5e7df752a6 DRTVWR-494: Use std:🧵:id for LLThread::currentID().
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:🧵: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:🧵: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:🧵: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-25 15:28:17 -04:00
Nat Goodspeed 7a09a5391a DRTVWR-494: Add on_main_thread(), sibling to assert_main_thread(). 2020-03-25 15:28:17 -04:00
andreykproductengine 8a92a771ba SL-10291 Replace apr thread with standard C++11 functionality 2019-01-15 22:27:28 +02:00
andreykproductengine 26fae750ba SL-10291 Replace apr_mutex with standard C++11 functionality 2019-01-14 22:04:44 +02:00
andreykproductengine c032bab9df MAINT-5651 LLTrace issues on exit 2018-08-21 20:30:24 +03:00
andreykproductengine 481713000b MAINT-8183 Fixed some exit issues and crashes 2018-02-22 15:23:14 +02:00
AndreyL ProductEngine 02342cb9ae Merged in lindenlab/viewer-release 2018-02-12 21:09:20 +02:00
Andrey Kleshchev b10e46167b MAINT-8234 Mesh tread protections and removed unnecessary try in staticRun() 2018-01-29 12:40:44 +00:00
Oz Linden d7c8678c3a merge 5.1.0-release 2018-01-17 12:43:28 -05:00
Rider Linden 1038633526 MAINT-7634: Logging and instrumentation canges to narrow down viewer crashes. 2017-08-08 09:04:32 -07:00
Oz Linden fd3628ef45 Change certificate store infrastructure to key off of the Subject Key
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.
2017-04-14 16:05:59 -04:00
Nicky a116f96a2f Windows: USe the correct datatypes when calling the Windows API.
(transplanted from 8b0c42b1a4f0416a17c8ec6078a85c5773f69a25)
2016-04-22 13:02:37 +02:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Cinder 6df6aef621 OPEN-282 - Define LL_THREAD_LOCAL for our platforms in order to unify TLS support 2014-11-19 22:27:36 -07:00
Cinder 5f608c0a23 OPEN-282 Use pthreads for TLS on mac 2014-11-19 08:01:28 -07:00
Richard Linden 80b4a4a1f5 merge with release 2014-02-24 18:45:59 -08:00
Richard Linden 5df86c9a6e fix for heap corruption crash on shutdown
don't set stopped flag until recorder object has been deleted
2014-01-30 19:35:34 -08:00
Richard Linden 1522c1b3bd SH-4653 FIX Interesting: Viewer crashes while reading chat history
fix for crash on exit resulting from 8c0e024d0c33
2013-12-10 15:48:57 -08:00
Richard Linden 0b40ee53e3 BUILDFIX: bad use of non static member 2013-12-10 14:04:09 -08:00
Richard Linden d4f3fe3c56 SH-4653 FIX Interesting: Viewer crashes while reading chat history 2013-12-10 12:50:23 -08:00
Richard Linden 6b84d40558 added some comments and changed calls from get_master_thread_recorder()
over to get_thread_recorder() to be agnostic about which thread we're running on
2013-12-05 21:58:45 -08:00
Richard Linden 7f67e1d4a4 fixed legacy usage of llendl 2013-10-11 10:42:32 -07:00
Richard Linden 80dfbbaacd merge from viewer-release 2013-10-08 11:59:24 -07:00
Monty Brandenberg 6f5790da38 Merge. Pull in viewer-release after 3.6.7 release. 2013-10-04 15:36:52 -04:00
Richard Linden e340009fc5 second phase summer cleaning
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
2013-08-09 17:11:19 -07:00
Monty Brandenberg 0d93247359 SH-4411 Thread/mutex rework between main and worker thread
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-08-06 18:05:34 -04:00
Richard Linden 862cdf3061 SH-4297 WIP interesting: viewer-interesting starts loading cached scene late
fixed ostream precision munging in llsys
2013-07-18 15:08:46 -07:00
Richard Linden 11e14cd3b0 SH-4299Interesting: High fps shown temporarily off scale in statistics console
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-15 11:05:57 -07:00
Richard Linden 04bdc8ba83 SH-4294 FIX Interesting: Statistics Texture cache hit rate is always 0%
also, removed LLTrace::init and cleanup
removed derived class implementation of memory stat for LLMemTrackable
is automatic now
2013-07-01 17:04:01 -07:00
Richard Linden 2fc422f39d fixed memory leak due to implementation of LLThreadLocalSingleton
removed LLThreadLocalSingleton
collapsed all thread recorder classes to single type, LLTrace::ThreadRecorder
moved fasttimer stack head to llthreadlocalsingletonpointer via ThreadRecorder
2013-06-30 13:32:34 -07:00