Namespace shortening was kinda ok for function names produced by MSVC, which
are generally clean looking. However, gcc/clang like to produce function names
which include template arguments, function parameters, return values, etc. In
such cases the old algorithm simply didn't work, because removal of everything
before the last :: could as well happen in midst of function parameters list.
The result was certainly not an usable function name.
With this new approach namespaces are no longer explicitly mentioned and this
functionality is simply called zone name shortening.
The user-selectable options were changed to make the shortening always
enabled, disabled, or to apply as needed. Note that the "as needed" approach
will be dynamic, trying to gradually remove more and more from the name, until
it fits in the requested area.
Current implementation is only the first step into making this work. In this
first step the function parameters are reduced to () and the template
arguments are reduced to <>. This alone greatly improves readability of the
zone names.
The option to reduce namespaces to one letter (i.e. std::tr1::hash would
become s:t:hash) will no longer be present, now or in the future.
The new NFD library is not using this information, and the old one was using
it only on Windows. Oh well.
Removal of this functionality also removes some build-time decisions.
reduce memory by storing the thread ids next to the zones intead of
making zone lists per thread.
speed-up by reading the zones in linear order rather than bisecting
the whole list for each sample.
Add to the statistics view an option for "Non-reentrant
time", which displays the count of and time spent in zone
events which were the only appearances (at that time) of
their zones on their threads' stacks.
Besides the GUI changes, this involves:
- Introducing a tri-state accumulation mode to replace the
boolean "self time": now there's "Self time only",
"Child time", and "Non-reentrant time".
- Removing the separate "selfTotal" from SrcLocZonesSlim,
making "total" represent whichever of the now three options
is active, which in turn requires keeping track of the
accumulation mode in StatisticsCache and invalidating that
cache when the accumulation mode changes.
These two methods can search a timeline to determine whether
a given ZoneEvent is the only appearance of the given zone
on the current thread stack, or a re-entry.