Tracing/Profiling D Applications
Ali Çehreli
acehreli at yahoo.com
Sun May 29 21:08:37 UTC 2022
On 5/29/22 13:47, Christian Köstlin wrote:
> Our discussion with using TLS for the
> collectors proposed to not need any lock on the add method for
> collector, because its thread local and with that thread safe?
It would be great that way but then the client changed the requirements
on us:
On 5/26/22 12:54, Christian Köstlin wrote:
> I want to be able to dump tracings even while the program is still
running.
:p
If the collected data were TLS, then the dumping thread should be able
to ask each thread to provide data collected so far. That either
requires synchronization, which I did, which necessitated shared
Collector objects; or messaging, which would require each thread
checking their Concurrency message box.
I don't know...
A third option came to me: Each thread periodically puts their data to a
common location and dumper dumps whatever is aggregated up to that
point. This would reduce contention.
Ali
More information about the Digitalmars-d-learn
mailing list