Commit 64cb2c4a by Paolo Carlini Committed by Paolo Carlini

allocator.cc: Demangle typeid(obj).name().

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
parent bbe4ef89
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> 2004-01-07 Benjamin Kosnik <bkoz@redhat.com>
* crossconfig.m4: Add LFS, io bits to linux cross config. * crossconfig.m4: Add LFS, io bits to linux cross config.
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <sstream> #include <sstream>
#include <ext/mt_allocator.h> #include <ext/mt_allocator.h>
#include <ext/malloc_allocator.h> #include <ext/malloc_allocator.h>
#include <cxxabi.h>
#include <testsuite_performance.h> #include <testsuite_performance.h>
using namespace std; using namespace std;
...@@ -108,6 +109,7 @@ template<typename Container> ...@@ -108,6 +109,7 @@ template<typename Container>
test_container(Container obj) test_container(Container obj)
{ {
using namespace __gnu_test; using namespace __gnu_test;
int status;
time_counter time; time_counter time;
resource_counter resource; resource_counter resource;
...@@ -118,7 +120,8 @@ template<typename Container> ...@@ -118,7 +120,8 @@ template<typename Container>
std::ostringstream comment; std::ostringstream comment;
comment << "iterations: " << test_iterations << '\t'; 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_header(__FILE__, comment.str());
report_performance(__FILE__, string(), time, resource); report_performance(__FILE__, string(), time, resource);
} }
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include <pthread.h> #include <pthread.h>
#include <ext/mt_allocator.h> #include <ext/mt_allocator.h>
#include <ext/malloc_allocator.h> #include <ext/malloc_allocator.h>
#include <cxxabi.h>
#include <testsuite_performance.h> #include <testsuite_performance.h>
using namespace std; using namespace std;
...@@ -110,6 +111,8 @@ template<typename Container> ...@@ -110,6 +111,8 @@ template<typename Container>
test_container(Container obj) test_container(Container obj)
{ {
using namespace __gnu_test; using namespace __gnu_test;
int status;
time_counter time; time_counter time;
resource_counter resource; resource_counter resource;
...@@ -131,7 +134,8 @@ template<typename Container> ...@@ -131,7 +134,8 @@ template<typename Container>
std::ostringstream comment; std::ostringstream comment;
comment << "iterations: " << iterations << '\t'; 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_header(__FILE__, comment.str());
report_performance(__FILE__, string(), time, resource); report_performance(__FILE__, string(), time, resource);
} }
......
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