Commit d53c9e56 authored by Peter Griess's avatar Peter Griess

Disable memory reporting for non-GNU C++ libraries.

Summary:
- Non-GNU standard C++ libraries may have a different layout; only
report memory usage when we know we're using GNU's.

Test Plan:
- fbconfig -r folly && fbmake runtests
- ./configure && make check on Ubuntu/FC/Mac

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D998584
parent b97d804d
......@@ -350,6 +350,9 @@ class ConcurrentAccessData {
if (i > 0) sets_[i] = sets_[0];
}
// This requires knowledge of the C++ library internals. Only use it if we're
// using the GNU C++ library.
#ifdef _GLIBCXX_SYMVER
// memory usage
int64_t setMemorySize = sets_[0].size() * sizeof(*sets_[0].begin()._M_node);
int64_t cslMemorySize = 0;
......@@ -360,6 +363,7 @@ class ConcurrentAccessData {
LOG(INFO) << "size=" << sets_[0].size()
<< "; std::set memory size=" << setMemorySize
<< "; csl memory size=" << cslMemorySize;
#endif
readValues_.reserve(size);
deleteValues_.reserve(size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment