<feed xmlns='http://www.w3.org/2005/Atom'>
<title>viewer.git/indra/llcommon/lltracethreadrecorder.cpp, branch cef_147</title>
<subtitle>Megapahit's fork of the Second Life viewer.
</subtitle>
<id>https://megapahit.org/viewer.git/atom?h=cef_147</id>
<link rel='self' href='https://megapahit.org/viewer.git/atom?h=cef_147'/>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/'/>
<updated>2024-08-15T17:40:23Z</updated>
<entry>
<title>BugSplat Crash #1504587: std::vector::empty()</title>
<updated>2024-08-15T17:40:23Z</updated>
<author>
<name>Alexander Gavriliuk</name>
<email>alexandrgproductengine@lindenlab.com</email>
</author>
<published>2024-08-15T15:46:58Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=10ef293bc93230437d8aa3b17fcc1bfdc78f6ba8'/>
<id>urn:sha1:10ef293bc93230437d8aa3b17fcc1bfdc78f6ba8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>#824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed</title>
<updated>2024-04-29T04:56:09Z</updated>
<author>
<name>Andrey Lihatskiy</name>
<email>alihatskiy@productengine.com</email>
</author>
<published>2024-04-29T04:43:28Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=1b68f71348ecf3983b76b40d7940da8377f049b7'/>
<id>urn:sha1:1b68f71348ecf3983b76b40d7940da8377f049b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>SL-18620 Statistics-&gt;Advanced-&gt;Memory Usage no longer updating</title>
<updated>2023-08-24T18:47:26Z</updated>
<author>
<name>Alexander Gavriliuk</name>
<email>alexandrgproductengine@lindenlab.com</email>
</author>
<published>2023-08-24T14:02:08Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=57d784f80728f9ecd75f8dbc989cd75cf328c353'/>
<id>urn:sha1:57d784f80728f9ecd75f8dbc989cd75cf328c353</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Cleanup for loops in llcommon to use C++11 range based for loops</title>
<updated>2023-01-07T04:38:12Z</updated>
<author>
<name>Fawrsk</name>
<email>fawrsk@gmail.com</email>
</author>
<published>2023-01-07T04:38:12Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=9e743c99fb69db5694c388ae33656c62e3fa0b8e'/>
<id>urn:sha1:9e743c99fb69db5694c388ae33656c62e3fa0b8e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>DRTVWR-565: Merge branch 'origin/contribute' into DRTVWR-565</title>
<updated>2022-12-12T18:27:57Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2022-12-12T18:27:57Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=12f66fda1376a03a0ef791d22984bd4a13831b5a'/>
<id>urn:sha1:12f66fda1376a03a0ef791d22984bd4a13831b5a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>DRTVWR-575: Fix llcommon assumptions that size_t fits in 4 bytes.</title>
<updated>2022-11-03T18:58:32Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2022-11-03T18:58:32Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=9522a0b7c16414fce2103cf58bfdd63aaf0cb01b'/>
<id>urn:sha1:9522a0b7c16414fce2103cf58bfdd63aaf0cb01b</id>
<content type='text'>
It's a little distressing how often we have historically coded S32 or U32 to
pass a length or index.

There are more such assumptions in other viewer subdirectories, but this is a
start.
</content>
</entry>
<entry>
<title>SL-17868 Crash at ThreadRecorder::bringUpToDate</title>
<updated>2022-07-29T23:57:30Z</updated>
<author>
<name>Andrey Kleshchev</name>
<email>andreykproductengine@lindenlab.com</email>
</author>
<published>2022-07-29T22:36:56Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=fe26a9d32c422fa26cfd82e92f93ad33654c2c51'/>
<id>urn:sha1:fe26a9d32c422fa26cfd82e92f93ad33654c2c51</id>
<content type='text'>
According to bugsplat get_thread_recorder was null
Replaced apr based LLThreadLocalPointer with thread_local
</content>
</entry>
<entry>
<title>SL-16606: Add profiler category STATS</title>
<updated>2022-01-14T19:50:22Z</updated>
<author>
<name>Ptolemy</name>
<email>ptolemy@lindenlab.com</email>
</author>
<published>2022-01-13T21:05:43Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=8aa22b41650f13f3752643276ab1449de4fa3ab8'/>
<id>urn:sha1:8aa22b41650f13f3752643276ab1449de4fa3ab8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>SL-16148 SL-16244 SL-16270 SL-16253 Remove most BlockTimers, remove LLMemTracked, introduce alignas, hook most/all reamining allocs, disable synchronous occlusion, and convert frequently accessed LLSingletons to LLSimpleton</title>
<updated>2021-10-28T18:06:21Z</updated>
<author>
<name>Dave Parks</name>
<email>davep@lindenlab.com</email>
</author>
<published>2021-10-28T18:06:21Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=8d20480c5f77fe1fab8149d3cda79bdd61e77656'/>
<id>urn:sha1:8d20480c5f77fe1fab8149d3cda79bdd61e77656</id>
<content type='text'>
</content>
</entry>
<entry>
<title>DRTVWR-494: Defend LLInstanceTracker against multi-thread usage.</title>
<updated>2020-03-25T19:28:17Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2019-12-02T19:39:24Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=9d5b897600a8f9405ec37a141b9417f34a11c557'/>
<id>urn:sha1:9d5b897600a8f9405ec37a141b9417f34a11c557</id>
<content type='text'>
The previous implementation went to some effort to crash if anyone attempted
to create or destroy an LLInstanceTracker subclass instance during traversal.
That restriction is manageable within a single thread, but becomes unworkable
if it's possible that a given subclass might be used on more than one thread.

Remove LLInstanceTracker::instance_iter, beginInstances(), endInstances(),
also key_iter, beginKeys() and endKeys(). Instead, introduce key_snapshot()
and instance_snapshot(), the only means of iterating over LLInstanceTracker
instances. (These are intended to resemble functions, but in fact the current
implementation simply presents the classes.) Iterating over a captured
snapshot defends against container modifications during traversal. The term
'snapshot' reminds the coder that a new instance created during traversal will
not be considered. To defend against instance deletion during traversal, a
snapshot stores std::weak_ptrs which it lazily dereferences, skipping on the
fly any that have expired.

Dereferencing instance_snapshot::iterator gets you a reference rather than a
pointer. Because some use cases want to delete all existing instances, add an
instance_snapshot::deleteAll() method that extracts the pointer. Those cases
used to require explicitly copying instance pointers into a separate
container; instance_snapshot() now takes care of that. It remains the caller's
responsibility to ensure that all instances of that LLInstanceTracker subclass
were allocated on the heap.

Replace unkeyed static LLInstanceTracker::getInstance(T*) -- which returned
nullptr if that instance had been destroyed -- with new getWeak() method
returning std::weak_ptr&lt;T&gt;. Caller must detect expiration of that weak_ptr.

Adjust tests accordingly.

Use of std::weak_ptr to detect expired instances requires engaging
std::shared_ptr in the constructor. We now store shared_ptrs in the static
containers (std::map for keyed, std::set for unkeyed).

Make LLInstanceTrackerBase a template parameterized on the type of the static
data it manages. For that reason, hoist static data class declarations out of
the class definitions to an LLInstanceTrackerStuff namespace.

Remove the static atomic sIterationNestDepth and its methods incrementDepth(),
decrementDepth() and getDepth(), since they were used only to forbid creation
and destruction during traversal.

Add a std::mutex to static data. Introduce an internal LockStatic class that
locks the mutex while providing a pointer to static data, making that the only
way to access the static data.

The LLINSTANCETRACKER_DTOR_NOEXCEPT macro goes away because we no longer
expect ~LLInstanceTracker() to throw an exception in test programs.
That affects LLTrace::StatBase as well as LLInstanceTracker itself.

Adapt consumers to the new LLInstanceTracker API.
</content>
</entry>
</feed>
