allocator.cc: Demangle typeid(obj).name().
authorPaolo Carlini <pcarlini@suse.de>
Fri, 9 Jan 2004 10:09:31 +0000 (10:09 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 9 Jan 2004 10:09:31 +0000 (10:09 +0000)
2004-01-09  Paolo Carlini  <pcarlini@suse.de>

* testsuite/performance/allocator.cc: Demangle typeid(obj).name().
* testsuite/performance/allocator_thread.cc: Likewise.

From-SVN: r75571

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/performance/allocator.cc
libstdc++-v3/testsuite/performance/allocator_thread.cc

index 5ac66961d580e644bcefca4899139898b59bf6cb..ba2a6e90d4dd97e86f8b0f84407f1e2ec28450d3 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-09  Paolo Carlini  <pcarlini@suse.de>
+
+       * testsuite/performance/allocator.cc: Demangle typeid(obj).name().
+       * testsuite/performance/allocator_thread.cc: Likewise.
+
 2004-01-07  Benjamin Kosnik  <bkoz@redhat.com>
 
        * crossconfig.m4: Add LFS, io bits to linux cross config.
index 53058edb39548b392e236775a9250f643295d34f..88314a13bef497aae978224d7fe719193d026e18 100644 (file)
@@ -39,6 +39,7 @@
 #include <sstream>
 #include <ext/mt_allocator.h>
 #include <ext/malloc_allocator.h>
+#include <cxxabi.h>
 #include <testsuite_performance.h>
 
 using namespace std;
@@ -108,6 +109,7 @@ template<typename Container>
   test_container(Container obj)
   {
     using namespace __gnu_test;
+    int status;
 
     time_counter time;
     resource_counter resource;
@@ -118,7 +120,8 @@ template<typename Container>
  
     std::ostringstream comment;
     comment << "iterations: " << test_iterations << '\t';
-    comment << "type: " << typeid(obj).name();
+    comment << "type: " << abi::__cxa_demangle(typeid(obj).name(),
+                                              0, 0, &status);
     report_header(__FILE__, comment.str());
     report_performance(__FILE__, string(), time, resource);
   }
index 016f45a5d3033893f5cfbf5a8138db5e25283c15..98cf2b14291ad9f94abb51af560c4e9ec01f677c 100644 (file)
@@ -40,6 +40,7 @@
 #include <pthread.h>
 #include <ext/mt_allocator.h>
 #include <ext/malloc_allocator.h>
+#include <cxxabi.h>
 #include <testsuite_performance.h>
 
 using namespace std;
@@ -110,6 +111,8 @@ template<typename Container>
   test_container(Container obj)
   {
     using namespace __gnu_test;
+    int status;
+
     time_counter time;
     resource_counter resource;
 
@@ -131,7 +134,8 @@ template<typename Container>
  
     std::ostringstream comment;
     comment << "iterations: " << iterations << '\t';
-    comment << "type: " << typeid(obj).name();
+    comment << "type: " << abi::__cxa_demangle(typeid(obj).name(),
+                                              0, 0, &status);
     report_header(__FILE__, comment.str());
     report_performance(__FILE__, string(), time, resource);
   }