What are these "profile" tests for?!

Jonathan Wakely jwakely@redhat.com
Fri Jun 23 16:49:00 GMT 2017


I've just noticed these three tests which just seems to create very
large containers:

23_containers/unordered_map/profile/hash_map.cc
23_containers/unordered_map/profile/unordered.cc
23_containers/vector/profile/vector.cc

Does anybody know what they're for? They say

// Insert more than default item

They all use the magic number 10000 which occurs in
<profile/impl/profiler_trace.h> so I assume they're trying to test
what happens when some limit is exceeded, but the tests don't actually
use profile mode! Should they be using -D_GLIBCXX_PROFILE? Or are they
only meant to test anything useful when doing "make check-profile"?

Maybe I should hurry up and add SystemTap probe points to the
containers so we can simply delete profile mode.



More information about the Libstdc++ mailing list