summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrus <rus@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-02 22:12:31 +0000
committerrus <rus@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-02 22:12:31 +0000
commit0012f4fdae066f73c9f38cb33d3a338c3e356cdf (patch)
tree4ecb39d33b1a7e674b13f001e93d100c469de912
parentcacdeba69c4d241540573a1af66cc3ef82d56239 (diff)
downloadgcc-0012f4fdae066f73c9f38cb33d3a338c3e356cdf.tar.gz
Add doxygen tags. Fix tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/profile-stdlib@152423 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog.profile-stdlib27
-rw-r--r--libstdc++-v3/doc/doxygen/user.cfg.in11
-rw-r--r--libstdc++-v3/doc/xml/manual/profile_mode.xml31
-rw-r--r--libstdc++-v3/include/profile/base.h2
-rw-r--r--libstdc++-v3/include/profile/bitset4
-rw-r--r--libstdc++-v3/include/profile/deque8
-rw-r--r--libstdc++-v3/include/profile/impl/profiler.h24
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_container_size.h6
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_hash_func.h6
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_hashtable_size.h3
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h6
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_node.h6
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_state.h3
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_trace.h28
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_vector_size.h3
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_vector_to_list.h6
-rw-r--r--libstdc++-v3/include/profile/list8
-rw-r--r--libstdc++-v3/include/profile/map3
-rw-r--r--libstdc++-v3/include/profile/map.h47
-rw-r--r--libstdc++-v3/include/profile/multimap.h16
-rw-r--r--libstdc++-v3/include/profile/multiset.h16
-rw-r--r--libstdc++-v3/include/profile/set3
-rw-r--r--libstdc++-v3/include/profile/set.h16
-rw-r--r--libstdc++-v3/include/profile/unordered_map46
-rw-r--r--libstdc++-v3/include/profile/unordered_set41
-rw-r--r--libstdc++-v3/include/profile/vector25
26 files changed, 218 insertions, 177 deletions
diff --git a/libstdc++-v3/ChangeLog.profile-stdlib b/libstdc++-v3/ChangeLog.profile-stdlib
index dcc1c49f87c..12ee97024ff 100644
--- a/libstdc++-v3/ChangeLog.profile-stdlib
+++ b/libstdc++-v3/ChangeLog.profile-stdlib
@@ -1,3 +1,30 @@
+2009-10-02 Silvius Rus <silvius.rus@gmail.com>
+ * doc/xml/manual/profile_mode.xml: Add bibliography.
+ * doc/doxygen/user.cfg.in: Add files under include/profile/impl/.
+ * include/profile/bitset: Add doc strings.
+ * include/profile/base.h: Same.
+ * include/profile/map: Same.
+ * include/profile/set: Same.
+ * include/profile/impl/profiler_container_size.h: Same.
+ * include/profile/impl/profiler_vector_size.h: Same.
+ * include/profile/impl/profiler_hash_func.h: Same.
+ * include/profile/impl/profiler_trace.h: Same.
+ * include/profile/impl/profiler_vector_to_list.h: Same.
+ * include/profile/impl/profiler.h: Same.
+ * include/profile/impl/profiler_state.h: Same.
+ * include/profile/impl/profiler_map_to_unordered_map.h: Same.
+ * include/profile/impl/profiler_hashtable_size.h: Same.
+ * include/profile/impl/profiler_node.h: Same.
+ * include/profile/vector: Add doc strings. (operator=) Fix bug.
+ * include/profile/deque: Same.
+ * include/profile/list: Same.
+ * include/profile/set.h: Add doc strings. (operator=,erase) Fix bug.
+ * include/profile/map.h: Same.
+ * include/profile/unordered_map: Same.
+ * include/profile/multiset.h: Same.
+ * include/profile/unordered_set: Same.
+ * include/profile/multimap.h: Same.
+
2009-09-30 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/ext/profile/mutex_extensions.cc: Add excess-errors,
diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in
index 43d55f99b41..9ffcf1ef75c 100644
--- a/libstdc++-v3/doc/doxygen/user.cfg.in
+++ b/libstdc++-v3/doc/doxygen/user.cfg.in
@@ -669,6 +669,17 @@ INPUT = @srcdir@/doc/doxygen/doxygroups.cc \
include/profile/unordered_map \
include/profile/unordered_set \
include/profile/vector \
+ include/profile/base.h \
+ include/profile/impl/profiler.h \
+ include/profile/impl/profiler_container_size.h \
+ include/profile/impl/profiler_hash_func.h \
+ include/profile/impl/profiler_hashtable_size.h \
+ include/profile/impl/profiler_map_to_unordered_map.h \
+ include/profile/impl/profiler_node.h \
+ include/profile/impl/profiler_state.h \
+ include/profile/impl/profiler_trace.h \
+ include/profile/impl/profiler_vector_size.h \
+ include/profile/impl/profiler_vector_to_list.h \
include/ext/algorithm \
include/ext/functional \
include/ext/iterator \
diff --git a/libstdc++-v3/doc/xml/manual/profile_mode.xml b/libstdc++-v3/doc/xml/manual/profile_mode.xml
index 64304f84b3e..5bf8eb13207 100644
--- a/libstdc++-v3/doc/xml/manual/profile_mode.xml
+++ b/libstdc++-v3/doc/xml/manual/profile_mode.xml
@@ -1683,5 +1683,36 @@ sharing in multithreaded access at foo.cc:4. Detected N shared cache lines.
</sect1>
+<bibliography id="profile_mode.biblio">
+<title>Bibliography</title>
+
+ <biblioentry>
+ <title>
+ Perflint: A Context Sensitive Performance Advisor for C++ Programs
+ </title>
+
+ <author>
+ <firstname>Lixia</firstname>
+ <surname>Liu</surname>
+ </author>
+ <author>
+ <firstname>Silvius</firstname>
+ <surname>Rus</surname>
+ </author>
+
+ <copyright>
+ <year>2009</year>
+ <holder></holder>
+ </copyright>
+
+ <publisher>
+ <publishername>
+ Proceedings of the 2009 International Symposium on Code Generation
+ and Optimization
+ </publishername>
+ </publisher>
+ </biblioentry>
+</bibliography>
+
</chapter>
diff --git a/libstdc++-v3/include/profile/base.h b/libstdc++-v3/include/profile/base.h
index 03fb177f687..de7bfe9a56f 100644
--- a/libstdc++-v3/include/profile/base.h
+++ b/libstdc++-v3/include/profile/base.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
-// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
diff --git a/libstdc++-v3/include/profile/bitset b/libstdc++-v3/include/profile/bitset
index 9ebb075b3a8..96a59ea4ad9 100644
--- a/libstdc++-v3/include/profile/bitset
+++ b/libstdc++-v3/include/profile/bitset
@@ -1,7 +1,6 @@
// Profiling bitset implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
-// Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,6 +35,7 @@ namespace std
{
namespace __profile
{
+ /** @brief Bitset wrapper with performance instrumentation. */
template<size_t _Nb>
class bitset
: public _GLIBCXX_STD_D::bitset<_Nb>
diff --git a/libstdc++-v3/include/profile/deque b/libstdc++-v3/include/profile/deque
index 35364edc782..6ba3679e0c6 100644
--- a/libstdc++-v3/include/profile/deque
+++ b/libstdc++-v3/include/profile/deque
@@ -1,7 +1,6 @@
// Profiling deque implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
-// Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,6 +35,7 @@ namespace std
{
namespace __profile
{
+ /** @brief Deque wrapper with performance instrumentation. */
template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
class deque
: public _GLIBCXX_STD_D::deque<_Tp, _Allocator>
@@ -103,8 +103,8 @@ namespace __profile
operator=(deque&& __x)
{
// NB: DR 675.
- clear();
- swap(__x);
+ this->clear();
+ this->swap(__x);
return *this;
}
diff --git a/libstdc++-v3/include/profile/impl/profiler.h b/libstdc++-v3/include/profile/impl/profiler.h
index 1dee7b707a6..f86920344fc 100644
--- a/libstdc++-v3/include/profile/impl/profiler.h
+++ b/libstdc++-v3/include/profile/impl/profiler.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -43,13 +43,19 @@
#include <stddef.h>
#endif
-// Define a mechanism to protect all __cxxprof_impl operations against
-// threaded and exception reentrance.
+/**
+ * @namespace std::__cxxprof_guard
+ * @brief Mechanism to protect all __cxxprof_impl operations against
+ * multithreaded and exception reentrance.
+ */
namespace __cxxprof_guard
{
-// Thread safe reentrance guard.
-// Get in using __get_in. Get out using the destructor.
+/** @brief Reentrance guard.
+ *
+ * Mechanism to protect all __cxxprof_impl operations against recursion,
+ * multithreaded and exception reentrance.
+ */
template <int _Unused=0>
class __reentrance_guard
{
@@ -85,11 +91,15 @@ bool __reentrance_guard<_Unused>::__get_in()
} \
}
+/**
+ * @namespace std::__cxxprof_impl
+ * @brief Implementation of profile extension.
+ */
+namespace __cxxprof_impl
+{
// Forward declarations of implementation functions.
// Don't use any __cxxprof_impl:: in user code.
// Instead, use the __profcxx... macros, which offer guarded access.
-namespace __cxxprof_impl
-{
void __turn_on();
void __turn_off();
bool __is_invalid();
diff --git a/libstdc++-v3/include/profile/impl/profiler_container_size.h b/libstdc++-v3/include/profile/impl/profiler_container_size.h
index 9e43fa2363f..330afc5ba79 100644
--- a/libstdc++-v3/include/profile/impl/profiler_container_size.h
+++ b/libstdc++-v3/include/profile/impl/profiler_container_size.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -54,7 +54,7 @@
namespace __cxxprof_impl
{
-// Class for container size node.
+/** @brief A container size instrumentation line in the object table. */
class __container_size_info: public __object_info_base
{
public:
@@ -180,6 +180,7 @@ inline __container_size_info::__container_size_info(
_M_resize = __o._M_resize;
}
+/** @brief A container size instrumentation line in the stack table. */
class __container_size_stack_info: public __container_size_info
{
public:
@@ -187,6 +188,7 @@ class __container_size_stack_info: public __container_size_info
: __container_size_info(__o) {}
};
+/** @brief Container size instrumentation trace producer. */
class __trace_container_size
: public __trace_base<__container_size_info, __container_size_stack_info>
{
diff --git a/libstdc++-v3/include/profile/impl/profiler_hash_func.h b/libstdc++-v3/include/profile/impl/profiler_hash_func.h
index ad6f0b43c04..cf639545163 100644
--- a/libstdc++-v3/include/profile/impl/profiler_hash_func.h
+++ b/libstdc++-v3/include/profile/impl/profiler_hash_func.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -53,7 +53,7 @@
namespace __cxxprof_impl
{
-// Class for inefficient hash function.
+/** @brief A hash performance instrumentation line in the object table. */
class __hashfunc_info: public __object_info_base
{
public:
@@ -100,11 +100,13 @@ inline void __hashfunc_info::__destruct(size_t __chain, size_t __accesses,
_M_hops += __hops;
}
+/** @brief A hash performance instrumentation line in the stack table. */
class __hashfunc_stack_info: public __hashfunc_info {
public:
__hashfunc_stack_info(const __hashfunc_info& __o) : __hashfunc_info(__o) {}
};
+/** @brief Hash performance instrumentation producer. */
class __trace_hash_func
: public __trace_base<__hashfunc_info, __hashfunc_stack_info>
{
diff --git a/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h b/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h
index 711f516bc21..2192879325e 100644
--- a/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h
+++ b/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -55,6 +55,7 @@
namespace __cxxprof_impl
{
+/** @brief Hashtable size instrumentation trace producer. */
class __trace_hashtable_size : public __trace_container_size
{
public:
diff --git a/libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h b/libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h
index 72d231219ad..cdb88a86bcb 100644
--- a/libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h
+++ b/libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -100,7 +100,7 @@ inline float __map_find_cost(size_t __size)
return __map_find_cost_factor * static_cast<float>(__log2(__size));
}
-// Class for vector to list
+/** @brief A map-to-unordered_map instrumentation line in the object table. */
class __map2umap_info: public __object_info_base
{
public:
@@ -199,12 +199,14 @@ inline void __map2umap_info::__write(FILE* __f) const
_M_valid ? "valid" : "invalid");
}
+/** @brief A map-to-unordered_map instrumentation line in the stack table. */
class __map2umap_stack_info: public __map2umap_info
{
public:
__map2umap_stack_info(const __map2umap_info& o) : __map2umap_info(o) {}
};
+/** @brief Map-to-unordered_map instrumentation producer. */
class __trace_map2umap
: public __trace_base<__map2umap_info, __map2umap_stack_info>
{
diff --git a/libstdc++-v3/include/profile/impl/profiler_node.h b/libstdc++-v3/include/profile/impl/profiler_node.h
index 836b11cf597..cd2b9ab2016 100644
--- a/libstdc++-v3/include/profile/impl/profiler_node.h
+++ b/libstdc++-v3/include/profile/impl/profiler_node.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -97,7 +97,7 @@ inline void __write(FILE* __f, const __stack_t __stack)
}
}
-// Hash function for summary trace using stack as index.
+/** @brief Hash function for summary trace using call stack as index. */
class __stack_hash
{
public:
@@ -126,6 +126,7 @@ class __stack_hash
}
};
+/** @brief Base class for a line in the object table. */
class __object_info_base
{
public:
@@ -154,6 +155,7 @@ inline __object_info_base::__object_info_base(const __object_info_base& __o)
_M_valid = __o._M_valid;
}
+/** @brief Base class for a line in the stack table. */
template<typename __object_info>
class __stack_info_base
{
diff --git a/libstdc++-v3/include/profile/impl/profiler_state.h b/libstdc++-v3/include/profile/impl/profiler_state.h
index cdf818bf30c..64c10db616c 100644
--- a/libstdc++-v3/include/profile/impl/profiler_state.h
+++ b/libstdc++-v3/include/profile/impl/profiler_state.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -46,6 +46,7 @@
namespace __cxxprof_impl
{
+/** @brief Profiling mode on/off state. */
template <int _Unused=0>
class __state
{
diff --git a/libstdc++-v3/include/profile/impl/profiler_trace.h b/libstdc++-v3/include/profile/impl/profiler_trace.h
index 412ff4507bf..37bcb6436e5 100644
--- a/libstdc++-v3/include/profile/impl/profiler_trace.h
+++ b/libstdc++-v3/include/profile/impl/profiler_trace.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -69,6 +69,7 @@ namespace __cxxprof_impl
#if defined _GLIBCXX_PROFILE_THREADS && defined HAVE_TLS
#define _GLIBCXX_IMPL_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
typedef pthread_mutex_t __mutex_t;
+/** @brief Pthread mutex wrapper. */
template <int _Unused=0>
class __mutex {
public:
@@ -79,6 +80,7 @@ class __mutex {
#else
#define _GLIBCXX_IMPL_MUTEX_INITIALIZER 0
typedef int __mutex_t;
+/** @brief Mock mutex interface. */
template <int _Unused=0>
class __mutex {
public:
@@ -91,6 +93,7 @@ class __mutex {
template <int _Unused>
__mutex_t __mutex<_Unused>::__global_lock = _GLIBCXX_IMPL_MUTEX_INITIALIZER;
+/** @brief Representation of a warning. */
struct __warning_data
{
float __magnitude;
@@ -151,7 +154,7 @@ inline size_t __min(size_t __a, size_t __b)
return __a <= __b ? __a : __b;
}
-// Diagnostic tables.
+/** @brief Storage for diagnostic table entries. Has only static fields. */
template <int _Unused=0>
class __tables
{
@@ -174,7 +177,7 @@ __trace_vector_size* __tables<_Unused>::_S_vector_size = NULL;
template <int _Unused>
__trace_vector_to_list* __tables<_Unused>::_S_vector_to_list = NULL;
-// Settings.
+/** @brief Storage for user defined parameters. Has only static fields. */
template <int _Unused=0>
class __settings {
public:
@@ -207,6 +210,7 @@ inline size_t __max_mem()
return __settings<0>::_S_max_mem;
}
+/** @brief Base class for all trace producers. */
template <typename __object_info, typename __stack_info>
class __trace_base
{
@@ -448,11 +452,13 @@ inline FILE* __open_output_file(const char* extension)
}
}
-// Final report, registered by "atexit".
-// This can also be called directly by user code, including signal handlers.
-// It is protected against deadlocks by the reentrance guard in profiler.h.
-// However, when called from a signal handler that triggers while within
-// __cxxprof_impl (under the guarded zone), no output will be produced.
+/** @brief Final report method, registered with "atexit".
+ *
+ * This can also be called directly by user code, including signal handlers.
+ * It is protected against deadlocks by the reentrance guard in profiler.h.
+ * However, when called from a signal handler that triggers while within
+ * __cxxprof_impl (under the guarded zone), no output will be produced.
+ */
inline void __report(void)
{
__mutex<0>::__lock(__mutex<0>::__global_lock);
@@ -540,8 +546,10 @@ inline void __profcxx_init_unconditional()
__mutex<0>::__unlock(__mutex<0>::__global_lock);
}
-// This function must be called by each instrumentation point.
-// The common path is inlined fully.
+/** @brief This function must be called by each instrumentation point.
+ *
+ * The common path is inlined fully.
+ */
inline bool __profcxx_init(void)
{
if (__is_invalid()) {
diff --git a/libstdc++-v3/include/profile/impl/profiler_vector_size.h b/libstdc++-v3/include/profile/impl/profiler_vector_size.h
index 10435bf8877..dd42959825f 100644
--- a/libstdc++-v3/include/profile/impl/profiler_vector_size.h
+++ b/libstdc++-v3/include/profile/impl/profiler_vector_size.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -55,6 +55,7 @@
namespace __cxxprof_impl
{
+/** @brief Hashtable size instrumentation trace producer. */
class __trace_vector_size : public __trace_container_size
{
public:
diff --git a/libstdc++-v3/include/profile/impl/profiler_vector_to_list.h b/libstdc++-v3/include/profile/impl/profiler_vector_to_list.h
index 7240cd3843b..ec3dfbcfb86 100644
--- a/libstdc++-v3/include/profile/impl/profiler_vector_to_list.h
+++ b/libstdc++-v3/include/profile/impl/profiler_vector_to_list.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -53,7 +53,7 @@
namespace __cxxprof_impl
{
-// Class for vector to list
+/** @brief A vector-to-list instrumentation line in the object table. */
class __vector2list_info: public __object_info_base
{
public:
@@ -123,12 +123,14 @@ inline void __vector2list_info::__resize(size_t __from, size_t __to)
_M_resize += __from;
}
+/** @brief A vector-to-list instrumentation line in the stack table. */
class __vector2list_stack_info: public __vector2list_info {
public:
__vector2list_stack_info(const __vector2list_info& __o)
: __vector2list_info(__o) {}
};
+/** @brief Vector-to-list instrumentation producer. */
class __trace_vector_to_list
: public __trace_base<__vector2list_info, __vector2list_stack_info>
{
diff --git a/libstdc++-v3/include/profile/list b/libstdc++-v3/include/profile/list
index c31bb411669..061c5065826 100644
--- a/libstdc++-v3/include/profile/list
+++ b/libstdc++-v3/include/profile/list
@@ -1,7 +1,6 @@
// Profiling list implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
-// Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,6 +35,7 @@ namespace std
{
namespace __profile
{
+ /** @brief List wrapper with performance instrumentation. */
template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
class list
: public _GLIBCXX_STD_D::list<_Tp, _Allocator>
@@ -104,8 +104,8 @@ namespace __profile
operator=(list&& __x)
{
// NB: DR 675.
- clear();
- swap(__x);
+ this->clear();
+ this->swap(__x);
return *this;
}
diff --git a/libstdc++-v3/include/profile/map b/libstdc++-v3/include/profile/map
index 43d4f05ddc0..e396b852398 100644
--- a/libstdc++-v3/include/profile/map
+++ b/libstdc++-v3/include/profile/map
@@ -1,7 +1,6 @@
// Profiling map/multimap implementation -*- C++ -*-
-// Copyright (C) 2003, 2006
-// Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
diff --git a/libstdc++-v3/include/profile/map.h b/libstdc++-v3/include/profile/map.h
index cbfd9f48289..aa9e535a1e4 100644
--- a/libstdc++-v3/include/profile/map.h
+++ b/libstdc++-v3/include/profile/map.h
@@ -1,7 +1,6 @@
// Profiling map implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007
-// Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -35,8 +34,6 @@
#ifndef _GLIBCXX_PROFILE_MAP_H
#define _GLIBCXX_PROFILE_MAP_H 1
-//#include <profile/safe_sequence.h>
-//#include <profile/safe_iterator.h>
#include <utility>
#include <profile/base.h>
@@ -44,6 +41,7 @@ namespace std
{
namespace __profile
{
+ /** @brief Map wrapper with performance instrumentation. */
template<typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
typename _Allocator = std::allocator<std::pair<const _Key, _Tp> > >
class map
@@ -63,12 +61,6 @@ namespace __profile
typedef typename _Base::iterator iterator;
typedef typename _Base::const_iterator const_iterator;
-
-// typedef __gnu_profile::_Safe_iterator<typename _Base::iterator, map>
-// iterator;
-// typedef __gnu_profile::_Safe_iterator<typename _Base::const_iterator, map>
-// const_iterator;
-
typedef typename _Base::size_type size_type;
typedef typename _Base::difference_type difference_type;
typedef typename _Base::pointer pointer;
@@ -130,8 +122,8 @@ namespace __profile
operator=(map&& __x)
{
// NB: DR 675.
- clear();
- swap(__x);
+ this->clear();
+ this->swap(__x);
return *this;
}
@@ -285,12 +277,22 @@ namespace __profile
size() - size_before);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ erase(iterator __position)
+ {
+ iterator __i = _Base::erase(__position);
+ __profcxx_map_to_unordered_map_erase(this, size(), 1);
+ return __i;
+ }
+#else
void
erase(iterator __position)
{
_Base::erase(__position);
__profcxx_map_to_unordered_map_erase(this, size(), 1);
}
+#endif
size_type
erase(const key_type& __x)
@@ -315,11 +317,8 @@ namespace __profile
}
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- swap(map&& __x)
-#else
+
swap(map& __x)
-#endif
{
_Base::swap(__x);
}
@@ -484,22 +483,6 @@ namespace __profile
map<_Key, _Tp, _Compare, _Allocator>& __rhs)
{ __lhs.swap(__rhs); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- template<typename _Key, typename _Tp,
- typename _Compare, typename _Allocator>
- inline void
- swap(map<_Key, _Tp, _Compare, _Allocator>&& __lhs,
- map<_Key, _Tp, _Compare, _Allocator>& __rhs)
- { __lhs.swap(__rhs); }
-
- template<typename _Key, typename _Tp,
- typename _Compare, typename _Allocator>
- inline void
- swap(map<_Key, _Tp, _Compare, _Allocator>& __lhs,
- map<_Key, _Tp, _Compare, _Allocator>&& __rhs)
- { __lhs.swap(__rhs); }
-#endif
-
} // namespace __profile
} // namespace std
diff --git a/libstdc++-v3/include/profile/multimap.h b/libstdc++-v3/include/profile/multimap.h
index dbe9cb300df..b1fc70b63b2 100644
--- a/libstdc++-v3/include/profile/multimap.h
+++ b/libstdc++-v3/include/profile/multimap.h
@@ -1,7 +1,6 @@
// Profiling multimap implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009
-// Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,6 +35,7 @@ namespace std
{
namespace __profile
{
+ /** @brief Multimap wrapper with performance instrumentation. */
template<typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
typename _Allocator = std::allocator<std::pair<const _Key, _Tp> > >
class multimap
@@ -107,8 +107,8 @@ namespace __profile
operator=(multimap&& __x)
{
// NB: DR 675.
- clear();
- swap(__x);
+ this->clear();
+ this->swap(__x);
return *this;
}
@@ -203,11 +203,19 @@ namespace __profile
_Base::insert(__first, __last);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ erase(iterator __position)
+ {
+ return _Base::erase(__position);
+ }
+#else
void
erase(iterator __position)
{
_Base::erase(__position);
}
+#endif
size_type
erase(const key_type& __x)
diff --git a/libstdc++-v3/include/profile/multiset.h b/libstdc++-v3/include/profile/multiset.h
index 95a110faa87..759761bd52c 100644
--- a/libstdc++-v3/include/profile/multiset.h
+++ b/libstdc++-v3/include/profile/multiset.h
@@ -1,7 +1,6 @@
// Profiling multiset implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009
-// Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,6 +35,7 @@ namespace std
{
namespace __profile
{
+ /** @brief Multiset wrapper with performance instrumentation. */
template<typename _Key, typename _Compare = std::less<_Key>,
typename _Allocator = std::allocator<_Key> >
class multiset
@@ -105,8 +105,8 @@ namespace __profile
operator=(multiset&& __x)
{
// NB: DR 675.
- clear();
- swap(__x);
+ this->clear();
+ this->swap(__x);
return *this;
}
@@ -201,11 +201,19 @@ namespace __profile
{ _Base::insert(__l); }
#endif
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ erase(iterator __position)
+ {
+ return _Base::erase(__position);
+ }
+#else
void
erase(iterator __position)
{
_Base::erase(__position);
}
+#endif
size_type
erase(const key_type& __x)
diff --git a/libstdc++-v3/include/profile/set b/libstdc++-v3/include/profile/set
index cce4a49e7c0..11603a84858 100644
--- a/libstdc++-v3/include/profile/set
+++ b/libstdc++-v3/include/profile/set
@@ -1,7 +1,6 @@
// Profiling set/multiset implementation -*- C++ -*-
-// Copyright (C) 2003-2008
-// Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
diff --git a/libstdc++-v3/include/profile/set.h b/libstdc++-v3/include/profile/set.h
index 7c87ffa61e5..50fb16faf37 100644
--- a/libstdc++-v3/include/profile/set.h
+++ b/libstdc++-v3/include/profile/set.h
@@ -1,7 +1,6 @@
// Profiling set implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009
-// Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,6 +35,7 @@ namespace std
{
namespace __profile
{
+ /** @brief Set wrapper with performance instrumentation. */
template<typename _Key, typename _Compare = std::less<_Key>,
typename _Allocator = std::allocator<_Key> >
class set
@@ -105,8 +105,8 @@ namespace __profile
operator=(set&& __x)
{
// NB: DR 675.
- clear();
- swap(__x);
+ this->clear();
+ this->swap(__x);
return *this;
}
@@ -206,11 +206,19 @@ namespace __profile
{ _Base::insert(__l); }
#endif
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ erase(iterator __position)
+ {
+ return _Base::erase(__position);
+ }
+#else
void
erase(iterator __position)
{
_Base::erase(__position);
}
+#endif
size_type
erase(const key_type& __x)
diff --git a/libstdc++-v3/include/profile/unordered_map b/libstdc++-v3/include/profile/unordered_map
index 0868a69c15c..d1cb9217d23 100644
--- a/libstdc++-v3/include/profile/unordered_map
+++ b/libstdc++-v3/include/profile/unordered_map
@@ -1,7 +1,6 @@
// Profiling unordered_map/unordered_multimap implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007
-// Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -52,6 +51,7 @@ namespace std
{
namespace __profile
{
+ /** @brief Unordered_map wrapper with performance instrumentation. */
template<typename _Key, typename _Tp,
typename _Hash = std::hash<_Key>,
typename _Pred = std::equal_to<_Key>,
@@ -133,8 +133,8 @@ namespace __profile
operator=(unordered_map&& __x)
{
// NB: DR 675.
- clear();
- swap(__x);
+ this->clear();
+ this->swap(__x);
return *this;
}
@@ -228,8 +228,9 @@ namespace __profile
_M_profile_resize(__old_size, _Base::bucket_count());
return __res;
}
+
void
- swap(unordered_map&& __x)
+ swap(unordered_map& __x)
{
_Base::swap(__x);
}
@@ -274,25 +275,12 @@ namespace __profile
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
{ __x.swap(__y); }
- template<typename _Key, typename _Tp, typename _Hash,
- typename _Pred, typename _Alloc>
- inline void
- swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __x,
- unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
- { __x.swap(__y); }
-
- template<typename _Key, typename _Tp, typename _Hash,
- typename _Pred, typename _Alloc>
- inline void
- swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
- unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
- { __x.swap(__y); }
-
#undef _GLIBCXX_BASE
#undef _GLIBCXX_STD_BASE
#define _GLIBCXX_BASE unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>
#define _GLIBCXX_STD_BASE _GLIBCXX_STD_PR::_GLIBCXX_BASE
+ /** @brief Unordered_multimap wrapper with performance instrumentation. */
template<typename _Key, typename _Tp,
typename _Hash = std::hash<_Key>,
typename _Pred = std::equal_to<_Key>,
@@ -368,8 +356,8 @@ namespace __profile
operator=(unordered_multimap&& __x)
{
// NB: DR 675.
- clear();
- swap(__x);
+ this->clear();
+ this->swap(__x);
return *this;
}
@@ -454,7 +442,7 @@ namespace __profile
}
void
- swap(unordered_multimap&& __x)
+ swap(unordered_multimap& __x)
{
_Base::swap(__x);
}
@@ -501,20 +489,6 @@ namespace __profile
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
{ __x.swap(__y); }
- template<typename _Key, typename _Tp, typename _Hash,
- typename _Pred, typename _Alloc>
- inline void
- swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&& __x,
- unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
- { __x.swap(__y); }
-
- template<typename _Key, typename _Tp, typename _Hash,
- typename _Pred, typename _Alloc>
- inline void
- swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
- unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
- { __x.swap(__y); }
-
} // namespace __profile
} // namespace std
diff --git a/libstdc++-v3/include/profile/unordered_set b/libstdc++-v3/include/profile/unordered_set
index 43dd15a5fc2..6c2dd77cb5f 100644
--- a/libstdc++-v3/include/profile/unordered_set
+++ b/libstdc++-v3/include/profile/unordered_set
@@ -1,7 +1,6 @@
// Profiling unordered_set/unordered_multiset implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007
-// Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -52,6 +51,7 @@ namespace std
{
namespace __profile
{
+ /** @brief Unordered_set wrapper with performance instrumentation. */
template<typename _Key,
typename _Hash = std::hash<_Key>,
typename _Pred = std::equal_to<_Key>,
@@ -131,8 +131,8 @@ namespace __profile
operator=(unordered_set&& __x)
{
// NB: DR 675.
- clear();
- swap(__x);
+ this->clear();
+ this->swap(__x);
return *this;
}
@@ -152,7 +152,7 @@ namespace __profile
}
void
- swap(unordered_set&& __x)
+ swap(unordered_set& __x)
{
_Base::swap(__x);
}
@@ -260,23 +260,12 @@ namespace __profile
unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
{ __x.swap(__y); }
- template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
- inline void
- swap(unordered_set<_Value, _Hash, _Pred, _Alloc>&& __x,
- unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
- { __x.swap(__y); }
-
- template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
- inline void
- swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
- unordered_set<_Value, _Hash, _Pred, _Alloc>&& __y)
- { __x.swap(__y); }
-
#undef _GLIBCXX_BASE
#undef _GLIBCXX_STD_BASE
#define _GLIBCXX_STD_BASE _GLIBCXX_STD_PR::_GLIBCXX_BASE
#define _GLIBCXX_BASE unordered_multiset<_Value, _Hash, _Pred, _Alloc>
+ /** @brief Unordered_multiset wrapper with performance instrumentation. */
template<typename _Value,
typename _Hash = std::hash<_Value>,
typename _Pred = std::equal_to<_Value>,
@@ -352,8 +341,8 @@ namespace __profile
operator=(unordered_multiset&& __x)
{
// NB: DR 675.
- clear();
- swap(__x);
+ this->clear();
+ this->swap(__x);
return *this;
}
@@ -373,7 +362,7 @@ namespace __profile
}
void
- swap(unordered_multiset&& __x)
+ swap(unordered_multiset& __x)
{
_Base::swap(__x);
}
@@ -482,18 +471,6 @@ namespace __profile
unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
{ __x.swap(__y); }
- template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
- inline void
- swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>&& __x,
- unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
- { __x.swap(__y); }
-
- template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
- inline void
- swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
- unordered_multiset<_Value, _Hash, _Pred, _Alloc>&& __y)
- { __x.swap(__y); }
-
} // namespace __profile
} // namespace std
diff --git a/libstdc++-v3/include/profile/vector b/libstdc++-v3/include/profile/vector
index 479ee2148ee..e6aeb686a7a 100644
--- a/libstdc++-v3/include/profile/vector
+++ b/libstdc++-v3/include/profile/vector
@@ -1,7 +1,6 @@
// Profiling vector implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
-// Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -43,6 +42,7 @@ namespace std
{
namespace __profile
{
+ /** @brief Vector wrapper with performance instrumentation. */
template<typename _Tp,
typename _Allocator = std::allocator<_Tp> >
class vector
@@ -141,8 +141,8 @@ namespace __profile
operator=(vector&& __x)
{
// NB: DR 675.
- clear();
- swap(__x);
+ this->clear();
+ this->swap(__x);
return *this;
}
@@ -262,11 +262,8 @@ namespace __profile
#endif
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- swap(vector&& __x)
-#else
+
swap(vector& __x)
-#endif
{
_Base::swap(__x);
}
@@ -365,18 +362,6 @@ namespace __profile
swap(vector<_Tp, _Alloc>& __lhs, vector<_Tp, _Alloc>& __rhs)
{ __lhs.swap(__rhs); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- template<typename _Tp, typename _Alloc>
- inline void
- swap(vector<_Tp, _Alloc>&& __lhs, vector<_Tp, _Alloc>& __rhs)
- { __lhs.swap(__rhs); }
-
- template<typename _Tp, typename _Alloc>
- inline void
- swap(vector<_Tp, _Alloc>& __lhs, vector<_Tp, _Alloc>&& __rhs)
- { __lhs.swap(__rhs); }
-#endif
-
} // namespace __profile
using _GLIBCXX_STD_D::_S_word_bit;
} // namespace std