On Thu, Oct 16, 2025, 17:09 Jonathan Wakely <[email protected]> wrote:
<...>
> I was inspired by the
> Boost.Stacktrace output, because I figured you'd already considered
> this. That's why I made it print "1#" instead of "#1" for example,
> although I'm still undecided about that :-)

I have not put enough thoughts into "1#". I just took that from some other
programming language that already had a stacktrace.


> I don't think the performance of dumping a std::stacktrace to an ostream
is too critical.

If the debug symbols are available then the bottleneck is usually in
mmaping DWARF information from the hard drive or in working with DWARF.

Otherwise _dl_find_object is tempting for scalability. It does not take a
global lock, so stacktraces in different threads won't slow down each other.

IMO it is better to update dladdr in libc to use _dl_find_object, rather
than doing the same thing in libstdc++ and leaving dladdr unoptimized

Reply via email to