summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-04 07:52:14 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-04 07:52:14 +0000
commit54c35eddda940c71a3912fa8498c23e89ac0bff9 (patch)
tree21f6ea79836308e8072334f95b762519c3dd3751 /libstdc++-v3
parent2f7a9ec1f5fb23e958da404c28d177e6905482e6 (diff)
downloadgcc-54c35eddda940c71a3912fa8498c23e89ac0bff9.tar.gz
2006-10-04 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/util/performance/priority_queue/mem_usage/ pop_test.hpp: Correct typo. * testsuite/util/performance/assoc/mem_usage/ multimap_insert_test.hpp: Same. * testsuite/util/performance/assoc/mem_usage/erase_test.hpp: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117427 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog8
-rw-r--r--libstdc++-v3/testsuite/util/performance/assoc/mem_usage/erase_test.hpp7
-rw-r--r--libstdc++-v3/testsuite/util/performance/assoc/mem_usage/multimap_insert_test.hpp14
-rw-r--r--libstdc++-v3/testsuite/util/performance/priority_queue/mem_usage/pop_test.hpp9
4 files changed, 29 insertions, 9 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index ccfeb4cc1f8..93c78d4e515 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,11 @@
+2006-10-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/util/performance/priority_queue/mem_usage/
+ pop_test.hpp: Correct typo.
+ * testsuite/util/performance/assoc/mem_usage/
+ multimap_insert_test.hpp: Same.
+ * testsuite/util/performance/assoc/mem_usage/erase_test.hpp: Same.
+
2006-10-03 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/util/testsuite_allocator.h (allocation_tracker): To
diff --git a/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/erase_test.hpp b/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/erase_test.hpp
index c95d9f7917a..3d2804e81f5 100644
--- a/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/erase_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/erase_test.hpp
@@ -96,14 +96,17 @@ namespace pb_ds
It ins_it_e = m_ins_b;
std::advance(ins_it_e, ins_size);
+ typedef __gnu_test::tracker_allocator_counter counter_type;
__gnu_test::tracker_allocator<char> alloc;
- const size_t init_mem = alloc.get_allocation_count() - alloc.get_deallocation_count();
+ const size_t init_mem = counter_type::get_allocation_count()
+ - counter_type::get_deallocation_count();
Cntnr cntnr(ins_it_b, ins_it_e);
while (cntnr.size() > 1)
cntnr.erase(*cntnr.begin());
- const size_t final_mem = alloc.get_allocation_count() - alloc.get_deallocation_count();
+ const size_t final_mem = counter_type::get_allocation_count()
+ - counter_type::get_deallocation_count();
assert(final_mem > init_mem);
const size_t delta_mem = final_mem - init_mem;
res_set_fmt.add_res(ins_size, static_cast<double>(delta_mem));
diff --git a/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/multimap_insert_test.hpp b/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/multimap_insert_test.hpp
index 92e98ce786a..1fb4eef9003 100644
--- a/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/multimap_insert_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/multimap_insert_test.hpp
@@ -116,12 +116,15 @@ namespace pb_ds
multimap_insert_test<It, Native>::
insert(Cntnr, It ins_it_b, It ins_it_e, pb_ds::detail::true_type)
{
+ typedef __gnu_test::tracker_allocator_counter counter_type;
__gnu_test::tracker_allocator<char> alloc;
- const size_t init_mem = alloc.get_allocation_count() - alloc.get_deallocation_count();
+ const size_t init_mem = counter_type::get_allocation_count()
+ - counter_type::get_deallocation_count();
Cntnr cntnr;
for (It ins_it = ins_it_b; ins_it != ins_it_e; ++ins_it)
cntnr.insert((typename Cntnr::const_reference)(*ins_it));
- const size_t final_mem = alloc.get_allocation_count() - alloc.get_deallocation_count();
+ const size_t final_mem = counter_type::get_allocation_count()
+ - counter_type::get_deallocation_count();
assert(final_mem > init_mem);
return (final_mem - init_mem);
}
@@ -132,12 +135,15 @@ namespace pb_ds
multimap_insert_test<It, Native>::
insert(Cntnr, It ins_it_b, It ins_it_e, pb_ds::detail::false_type)
{
+ typedef __gnu_test::tracker_allocator_counter counter_type;
__gnu_test::tracker_allocator<char> alloc;
- const size_t init_mem = alloc.get_allocation_count() - alloc.get_deallocation_count();
+ const size_t init_mem = counter_type::get_allocation_count()
+ - counter_type::get_deallocation_count();
Cntnr cntnr;
for (It ins_it = ins_it_b; ins_it != ins_it_e; ++ins_it)
cntnr[ins_it->first].insert(ins_it->second);
- const size_t final_mem = alloc.get_allocation_count() - alloc.get_deallocation_count();
+ const size_t final_mem = counter_type::get_allocation_count()
+ - counter_type::get_deallocation_count();
assert(final_mem > init_mem);
return (final_mem - init_mem);
}
diff --git a/libstdc++-v3/testsuite/util/performance/priority_queue/mem_usage/pop_test.hpp b/libstdc++-v3/testsuite/util/performance/priority_queue/mem_usage/pop_test.hpp
index 0ca0fdc6035..a3b8486f191 100644
--- a/libstdc++-v3/testsuite/util/performance/priority_queue/mem_usage/pop_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/priority_queue/mem_usage/pop_test.hpp
@@ -95,9 +95,11 @@ namespace pb_ds
It ins_it_e = m_ins_b;
std::advance(ins_it_e, ins_size);
+ typedef __gnu_test::tracker_allocator_counter counter_type;
__gnu_test::tracker_allocator<char> alloc;
- const size_t init_mem = alloc.get_allocation_count() - alloc.get_deallocation_count();
+ const size_t init_mem = counter_type::get_allocation_count()
+ - counter_type::get_deallocation_count();
Cntnr cntnr;
for (It ins_it = ins_it_b; ins_it != ins_it_e; ++ins_it)
cntnr.push(ins_it->first);
@@ -105,7 +107,8 @@ namespace pb_ds
while (cntnr.size() > 1)
cntnr.pop();
- const size_t final_mem = alloc.get_allocation_count() - alloc.get_deallocation_count();
+ const size_t final_mem = counter_type::get_allocation_count()
+ - counter_type::get_deallocation_count();
assert(final_mem > init_mem);
const size_t delta_mem = final_mem - init_mem;
res_set_fmt.add_res(ins_size, static_cast<double>(delta_mem));
@@ -114,5 +117,5 @@ namespace pb_ds
} // namespace test
} // namespace pb_ds
-#endif // #ifndef PB_DS_POP_TEST_HPP
+#endif