This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Performance and memory usage improvements for stl_tree.h
- From: Gawain Bolton <gp dot bolton at computer dot org>
- To: libstdc++ at gcc dot gnu dot org
- Date: Sat, 01 Mar 2003 18:02:52 +0100
- Subject: Re: [Patch] Performance and memory usage improvements for stl_tree.h
- References: <3E57882B.3050200@computer.org> <20030222162959.GC25068@tofu.dreamhost.com> <3E5CF3C9.7090303@computer.org> <20030226174828.GO28793@tofu.dreamhost.com> <3E5D38D6.6020902@computer.org> <20030227124937.3fc24b05.bkoz@redhat.com>
Benjamin Kosnik wrote:
So here is yet another patch using static_cast<> for the new code. The
existing code could be cleaned up in several ways, such as using
static_cast<> elsewhere rather than C style casts. I have tried to
refrain from doing this to keep the purppose of this patch focused. I
am also trying to figure out how to contribute improvements to libstdc++
and so want to start with something simple.
Well, this is a good start, thanks.
We need something to add as a performance metric for this kind of
change. What did you do tests with? How are you measuring the
performance improvement?
I'm not trying to be facetious, but you do not even need to measure the
performance to see that the patch supplied will improve it. The header
node is no longer dynamically allocated and de-allocated, so the
performance of construction and destruction can only be improved.
The problem with providing performance measurements is that the time
required to dynamically allocate memory depends on:
1. The underlying operating system.
2. The amount of memory fragmentation at the time of the test.
3. The amount of memory requested.
So yes you can measure performance, but your mileage will vary depending
on the above.
Here are some numbers for i686-pc-linux-gnu using RedHat Linx 7.3 with
kernel 2.4.18-24.7.x using gprof. The test is performed for 10 million
iterations using std::map with both the key and value as "int":
* Without patch (revision 1.19)
o Constructor: 4.74 seconds
o Destructor: 1.58 seconds
* With last supplied patch:
o Constructor: 2.78 seconds
o Destructor: 0.53 seconds
Please find attached the test program used, as well as the numbers given
by gprof.
These numbers give a performance improvement of 41% for the constructor
and 66% for the destructor. The type used for both the key and value
was only "int" so this means that the header node will not require much
memory to be allocated. As such these numbers can be considered to be
lower bound or "worst case" performance improvements.
The performance improvement may not be important in a lot of cases, but
it may well be in some cases. All programs will benefit by the reduced
memory requirements though. The amount of memory saved will depend on
the number of std::map, std::set, std::multimap and std::multiset
objects as well as the size of the template parameters.
Gawain
// 2003-03-01 gp dot bolton at computer dot org
// Copyright (C) 2003 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 of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
#include <map>
#include <testsuite_hooks.h>
static bool test = true;
static void create_and_fill(const unsigned int n)
{
typedef std::map<int, int> Map;
Map m;
for (unsigned int i = 0; i < n; ++i)
{
m[i] = i;
}
VERIFY ( m.size() == n );
}
void test01()
{
const unsigned n = 10000000;
for (unsigned int i = 0; i < n; ++i)
{
create_and_fill( 0 );
}
}
int main()
{
test01();
return !test;
}
Flat profile:
Each sample counts as 0.00195312 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
54.07 16.54 16.54 __mcount_internal
16.17 21.48 4.95 mcount
3.37 22.51 1.03 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_empty_initialize()
2.85 23.39 0.87 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_Rb_tree[in-charge](std::less<int> const&, std::allocator<std::pair<int const, int> > const&)
2.05 24.01 0.63 10000000 0.00 0.00 create_and_fill(unsigned)
1.83 24.57 0.56 10000000 0.00 0.00 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::map[in-charge]()
1.83 25.13 0.56 std::__default_alloc_template<(bool)1, (int)0>::allocate(unsigned)
1.52 25.60 0.46 10000000 0.00 0.00 std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::_Rb_tree_base[not-in-charge](std::allocator<std::pair<int const, int> > const&)
1.35 26.01 0.41 std::__default_alloc_template<(bool)1, (int)0>::deallocate(void*, unsigned)
1.21 26.38 0.37 10000000 0.00 0.00 std::__simple_alloc<std::_Rb_tree_node<std::pair<int const, int> >, std::__default_alloc_template<(bool)1, (int)0> >::allocate(unsigned)
1.02 26.69 0.31 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree [in-charge]()
1.02 27.00 0.31 10000000 0.00 0.00 std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree_base [not-in-charge]()
0.99 27.31 0.30 10000000 0.00 0.00 std::__simple_alloc<std::_Rb_tree_node<std::pair<int const, int> >, std::__default_alloc_template<(bool)1, (int)0> >::deallocate(std::_Rb_tree_node<std::pair<int const, int> >*, unsigned)
0.92 27.59 0.28 10000000 0.00 0.00 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const
0.89 27.86 0.27 1 273.44 7615.23 test01()
0.85 28.12 0.26 10000000 0.00 0.00 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_M_put_node(std::_Rb_tree_node<std::pair<int const, int> >*)
0.82 28.37 0.25 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_root() const
0.75 28.60 0.23 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::clear()
0.59 28.78 0.18 10000000 0.00 0.00 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_M_get_node()
0.57 28.96 0.18 10000000 0.00 0.00 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_Rb_tree_alloc_base[not-in-charge](std::allocator<std::pair<int const, int> > const&)
0.57 29.13 0.17 10000000 0.00 0.00 std::allocator<std::pair<int const, int> >::allocator[in-charge]()
0.52 29.29 0.16 10000000 0.00 0.00 std::allocator<std::pair<int const, int> >::~allocator [in-charge]()
0.51 29.45 0.16 10000000 0.00 0.00 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::~map [in-charge]()
0.50 29.60 0.15 10000000 0.00 0.00 std::less<int>::less[in-charge](std::less<int> const&)
0.45 29.74 0.14 std::__default_alloc_template<(bool)1, (int)0>::_Lock::~_Lock [in-charge]()
0.42 29.87 0.13 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_rightmost() const
0.40 29.99 0.12 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_leftmost() const
0.40 30.11 0.12 std::__default_alloc_template<(bool)1, (int)0>::_Lock::_Lock[in-charge]()
0.38 30.23 0.12 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const
0.34 30.33 0.10 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_S_color(std::_Rb_tree_node<std::pair<int const, int> >*)
0.17 30.38 0.05 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::operator[](int const&)
0.13 30.42 0.04 std::_Rb_tree_rotate_left(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&)
0.12 30.46 0.04 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_S_left(std::_Rb_tree_node<std::pair<int const, int> >*)
0.11 30.50 0.03 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::lower_bound(int const&)
0.10 30.53 0.03 std::_Rb_tree_rotate_right(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&)
0.10 30.55 0.03 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::insert_unique(std::_Rb_tree_iterator<std::pair<int const, int>, std::pair<int const, int>&, std::pair<int const, int>*>, std::pair<int const, int> const&)
0.09 30.58 0.03 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::insert(std::_Rb_tree_iterator<std::pair<int const, int>, std::pair<int const, int>&, std::pair<int const, int>*>, std::pair<int const, int> const&)
0.02 30.59 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_S_right(std::_Rb_tree_node<std::pair<int const, int> >*)
0.00 30.59 0.00 1 0.00 7615.23 main
% the percentage of the total running time of the
time program used by this function.
cumulative a running sum of the number of seconds accounted
seconds for by this function and those listed above it.
self the number of seconds accounted for by this
seconds function alone. This is the major sort for this
listing.
calls the number of times this function was invoked, if
this function is profiled, else blank.
self the average number of milliseconds spent in this
ms/call function per call, if this function is profiled,
else blank.
total the average number of milliseconds spent in this
ms/call function and its descendents per call, if this
function is profiled, else blank.
name the name of the function. This is the minor sort
for this listing. The index shows the location of
the function in the gprof listing. If the index is
in parenthesis it shows where it would appear in
the gprof listing if it were to be printed.
Call graph (explanation follows)
granularity: each sample hit covers 4 byte(s) for 0.02% of 9.10 seconds
index % time self children called name
0.00 7.62 1/1 __libc_start_main [3]
[1] 83.7 0.00 7.62 1 main [1]
0.27 7.34 1/1 test01() [2]
-----------------------------------------------
0.27 7.34 1/1 main [1]
[2] 83.7 0.27 7.34 1 test01() [2]
0.63 6.71 10000000/10000000 create_and_fill(unsigned) [4]
-----------------------------------------------
<spontaneous>
[3] 83.7 0.00 7.62 __libc_start_main [3]
0.00 7.62 1/1 main [1]
-----------------------------------------------
0.63 6.71 10000000/10000000 test01() [2]
[4] 80.6 0.63 6.71 10000000 create_and_fill(unsigned) [4]
0.56 4.18 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::map[in-charge]() [5]
0.16 1.42 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::~map [in-charge]() [8]
0.28 0.12 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const [16]
-----------------------------------------------
0.56 4.18 10000000/10000000 create_and_fill(unsigned) [4]
[5] 52.1 0.56 4.18 10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::map[in-charge]() [5]
0.87 2.98 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_Rb_tree[in-charge](std::less<int> const&, std::allocator<std::pair<int const, int> > const&) [6]
0.17 0.00 10000000/10000000 std::allocator<std::pair<int const, int> >::allocator[in-charge]() [22]
0.16 0.00 10000000/10000000 std::allocator<std::pair<int const, int> >::~allocator [in-charge]() [23]
-----------------------------------------------
0.87 2.98 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::map[in-charge]() [5]
[6] 42.3 0.87 2.98 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_Rb_tree[in-charge](std::less<int> const&, std::allocator<std::pair<int const, int> > const&) [6]
1.03 0.60 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_empty_initialize() [7]
0.46 0.72 10000000/10000000 std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::_Rb_tree_base[not-in-charge](std::allocator<std::pair<int const, int> > const&) [10]
0.15 0.00 10000000/10000000 std::less<int>::less[in-charge](std::less<int> const&) [24]
-----------------------------------------------
1.03 0.60 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_Rb_tree[in-charge](std::less<int> const&, std::allocator<std::pair<int const, int> > const&) [6]
[7] 17.9 1.03 0.60 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_empty_initialize() [7]
0.25 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_root() const [19]
0.13 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_rightmost() const [26]
0.12 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_leftmost() const [27]
0.10 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_S_color(std::_Rb_tree_node<std::pair<int const, int> >*) [30]
-----------------------------------------------
0.16 1.42 10000000/10000000 create_and_fill(unsigned) [4]
[8] 17.3 0.16 1.42 10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::~map [in-charge]() [8]
0.31 1.11 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree [in-charge]() [9]
-----------------------------------------------
0.31 1.11 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::~map [in-charge]() [8]
[9] 15.6 0.31 1.11 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree [in-charge]() [9]
0.31 0.56 10000000/10000000 std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree_base [not-in-charge]() [11]
0.23 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::clear() [20]
-----------------------------------------------
0.46 0.72 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_Rb_tree[in-charge](std::less<int> const&, std::allocator<std::pair<int const, int> > const&) [6]
[10] 13.1 0.46 0.72 10000000 std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::_Rb_tree_base[not-in-charge](std::allocator<std::pair<int const, int> > const&) [10]
0.18 0.37 10000000/10000000 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_M_get_node() [14]
0.18 0.00 10000000/10000000 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_Rb_tree_alloc_base[not-in-charge](std::allocator<std::pair<int const, int> > const&) [21]
-----------------------------------------------
0.31 0.56 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree [in-charge]() [9]
[11] 9.6 0.31 0.56 10000000 std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree_base [not-in-charge]() [11]
0.26 0.30 10000000/10000000 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_M_put_node(std::_Rb_tree_node<std::pair<int const, int> >*) [12]
-----------------------------------------------
0.26 0.30 10000000/10000000 std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree_base [not-in-charge]() [11]
[12] 6.2 0.26 0.30 10000000 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_M_put_node(std::_Rb_tree_node<std::pair<int const, int> >*) [12]
0.30 0.00 10000000/10000000 std::__simple_alloc<std::_Rb_tree_node<std::pair<int const, int> >, std::__default_alloc_template<(bool)1, (int)0> >::deallocate(std::_Rb_tree_node<std::pair<int const, int> >*, unsigned) [18]
-----------------------------------------------
<spontaneous>
[13] 6.1 0.56 0.00 std::__default_alloc_template<(bool)1, (int)0>::allocate(unsigned) [13]
-----------------------------------------------
0.18 0.37 10000000/10000000 std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::_Rb_tree_base[not-in-charge](std::allocator<std::pair<int const, int> > const&) [10]
[14] 6.0 0.18 0.37 10000000 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_M_get_node() [14]
0.37 0.00 10000000/10000000 std::__simple_alloc<std::_Rb_tree_node<std::pair<int const, int> >, std::__default_alloc_template<(bool)1, (int)0> >::allocate(unsigned) [17]
-----------------------------------------------
<spontaneous>
[15] 4.5 0.41 0.00 std::__default_alloc_template<(bool)1, (int)0>::deallocate(void*, unsigned) [15]
-----------------------------------------------
0.28 0.12 10000000/10000000 create_and_fill(unsigned) [4]
[16] 4.4 0.28 0.12 10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const [16]
0.12 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const [29]
-----------------------------------------------
0.37 0.00 10000000/10000000 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_M_get_node() [14]
[17] 4.1 0.37 0.00 10000000 std::__simple_alloc<std::_Rb_tree_node<std::pair<int const, int> >, std::__default_alloc_template<(bool)1, (int)0> >::allocate(unsigned) [17]
-----------------------------------------------
0.30 0.00 10000000/10000000 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_M_put_node(std::_Rb_tree_node<std::pair<int const, int> >*) [12]
[18] 3.3 0.30 0.00 10000000 std::__simple_alloc<std::_Rb_tree_node<std::pair<int const, int> >, std::__default_alloc_template<(bool)1, (int)0> >::deallocate(std::_Rb_tree_node<std::pair<int const, int> >*, unsigned) [18]
-----------------------------------------------
0.25 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_empty_initialize() [7]
[19] 2.7 0.25 0.00 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_root() const [19]
-----------------------------------------------
0.23 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree [in-charge]() [9]
[20] 2.5 0.23 0.00 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::clear() [20]
-----------------------------------------------
0.18 0.00 10000000/10000000 std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::_Rb_tree_base[not-in-charge](std::allocator<std::pair<int const, int> > const&) [10]
[21] 1.9 0.18 0.00 10000000 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_Rb_tree_alloc_base[not-in-charge](std::allocator<std::pair<int const, int> > const&) [21]
-----------------------------------------------
0.17 0.00 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::map[in-charge]() [5]
[22] 1.9 0.17 0.00 10000000 std::allocator<std::pair<int const, int> >::allocator[in-charge]() [22]
-----------------------------------------------
0.16 0.00 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::map[in-charge]() [5]
[23] 1.8 0.16 0.00 10000000 std::allocator<std::pair<int const, int> >::~allocator [in-charge]() [23]
-----------------------------------------------
0.15 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_Rb_tree[in-charge](std::less<int> const&, std::allocator<std::pair<int const, int> > const&) [6]
[24] 1.7 0.15 0.00 10000000 std::less<int>::less[in-charge](std::less<int> const&) [24]
-----------------------------------------------
<spontaneous>
[25] 1.5 0.14 0.00 std::__default_alloc_template<(bool)1, (int)0>::_Lock::~_Lock [in-charge]() [25]
-----------------------------------------------
0.13 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_empty_initialize() [7]
[26] 1.4 0.13 0.00 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_rightmost() const [26]
-----------------------------------------------
0.12 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_empty_initialize() [7]
[27] 1.4 0.12 0.00 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_leftmost() const [27]
-----------------------------------------------
<spontaneous>
[28] 1.4 0.12 0.00 std::__default_alloc_template<(bool)1, (int)0>::_Lock::_Lock[in-charge]() [28]
-----------------------------------------------
0.12 0.00 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const [16]
[29] 1.3 0.12 0.00 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const [29]
-----------------------------------------------
0.10 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_empty_initialize() [7]
[30] 1.1 0.10 0.00 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_S_color(std::_Rb_tree_node<std::pair<int const, int> >*) [30]
-----------------------------------------------
<spontaneous>
[31] 0.6 0.05 0.00 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::operator[](int const&) [31]
-----------------------------------------------
<spontaneous>
[32] 0.5 0.04 0.00 std::_Rb_tree_rotate_left(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&) [32]
-----------------------------------------------
<spontaneous>
[33] 0.4 0.04 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_S_left(std::_Rb_tree_node<std::pair<int const, int> >*) [33]
-----------------------------------------------
<spontaneous>
[34] 0.4 0.03 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::lower_bound(int const&) [34]
-----------------------------------------------
<spontaneous>
[35] 0.3 0.03 0.00 std::_Rb_tree_rotate_right(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&) [35]
-----------------------------------------------
<spontaneous>
[36] 0.3 0.03 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::insert_unique(std::_Rb_tree_iterator<std::pair<int const, int>, std::pair<int const, int>&, std::pair<int const, int>*>, std::pair<int const, int> const&) [36]
-----------------------------------------------
<spontaneous>
[37] 0.3 0.03 0.00 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::insert(std::_Rb_tree_iterator<std::pair<int const, int>, std::pair<int const, int>&, std::pair<int const, int>*>, std::pair<int const, int> const&) [37]
-----------------------------------------------
<spontaneous>
[38] 0.1 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_S_right(std::_Rb_tree_node<std::pair<int const, int> >*) [38]
-----------------------------------------------
This table describes the call tree of the program, and was sorted by
the total amount of time spent in each function and its children.
Each entry in this table consists of several lines. The line with the
index number at the left hand margin lists the current function.
The lines above it list the functions that called this function,
and the lines below it list the functions this one called.
This line lists:
index A unique number given to each element of the table.
Index numbers are sorted numerically.
The index number is printed next to every function name so
it is easier to look up where the function in the table.
% time This is the percentage of the `total' time that was spent
in this function and its children. Note that due to
different viewpoints, functions excluded by options, etc,
these numbers will NOT add up to 100%.
self This is the total amount of time spent in this function.
children This is the total amount of time propagated into this
function by its children.
called This is the number of times the function was called.
If the function called itself recursively, the number
only includes non-recursive calls, and is followed by
a `+' and the number of recursive calls.
name The name of the current function. The index number is
printed after it. If the function is a member of a
cycle, the cycle number is printed between the
function's name and the index number.
For the function's parents, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the function into this parent.
children This is the amount of time that was propagated from
the function's children into this parent.
called This is the number of times this parent called the
function `/' the total number of times the function
was called. Recursive calls to the function are not
included in the number after the `/'.
name This is the name of the parent. The parent's index
number is printed after it. If the parent is a
member of a cycle, the cycle number is printed between
the name and the index number.
If the parents of the function cannot be determined, the word
`<spontaneous>' is printed in the `name' field, and all the other
fields are blank.
For the function's children, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the child into the function.
children This is the amount of time that was propagated from the
child's children to the function.
called This is the number of times the function called
this child `/' the total number of times the child
was called. Recursive calls by the child are not
listed in the number after the `/'.
name This is the name of the child. The child's index
number is printed after it. If the child is a
member of a cycle, the cycle number is printed
between the name and the index number.
If there are any cycles (circles) in the call graph, there is an
entry for the cycle-as-a-whole. This entry shows who called the
cycle (as parents) and the members of the cycle (as children.)
The `+' recursive calls entry shows the number of function calls that
were internal to the cycle, and the calls entry for each member shows,
for that member, how many times it was called from other members of
the cycle.
Index by function name
[4] create_and_fill(unsigned) (gmon-start.c) [14] std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_M_get_node() [36] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::insert_unique(std::_Rb_tree_iterator<std::pair<int const, int>, std::pair<int const, int>&, std::pair<int const, int>*>, std::pair<int const, int> const&)
[2] test01() [12] std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_M_put_node(std::_Rb_tree_node<std::pair<int const, int> >*) [7] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_empty_initialize()
[16] std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const [21] std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_Rb_tree_alloc_base[not-in-charge](std::allocator<std::pair<int const, int> > const&) [20] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::clear()
[27] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_leftmost() const [15] std::__default_alloc_template<(bool)1, (int)0>::deallocate(void*, unsigned) [33] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_S_left(std::_Rb_tree_node<std::pair<int const, int> >*)
[26] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_rightmost() const [28] std::__default_alloc_template<(bool)1, (int)0>::_Lock::_Lock[in-charge]() [30] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_S_color(std::_Rb_tree_node<std::pair<int const, int> >*)
[29] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const [25] std::__default_alloc_template<(bool)1, (int)0>::_Lock::~_Lock [in-charge]() [38] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_S_right(std::_Rb_tree_node<std::pair<int const, int> >*)
[19] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_root() const [13] std::__default_alloc_template<(bool)1, (int)0>::allocate(unsigned) [6] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_Rb_tree[in-charge](std::less<int> const&, std::allocator<std::pair<int const, int> > const&)
[22] std::allocator<std::pair<int const, int> >::allocator[in-charge]() [37] std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::insert(std::_Rb_tree_iterator<std::pair<int const, int>, std::pair<int const, int>&, std::pair<int const, int>*>, std::pair<int const, int> const&) [9] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree [in-charge]()
[23] std::allocator<std::pair<int const, int> >::~allocator [in-charge]() [5] std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::map[in-charge]() [32] std::_Rb_tree_rotate_left(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&)
[10] std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::_Rb_tree_base[not-in-charge](std::allocator<std::pair<int const, int> > const&) [8] std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::~map [in-charge]() [35] std::_Rb_tree_rotate_right(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&)
[11] std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree_base [not-in-charge]() [31] std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::operator[](int const&) (2486) __mcount_internal
[18] std::__simple_alloc<std::_Rb_tree_node<std::pair<int const, int> >, std::__default_alloc_template<(bool)1, (int)0> >::deallocate(std::_Rb_tree_node<std::pair<int const, int> >*, unsigned) [24] std::less<int>::less[in-charge](std::less<int> const&) [1] main
[17] std::__simple_alloc<std::_Rb_tree_node<std::pair<int const, int> >, std::__default_alloc_template<(bool)1, (int)0> >::allocate(unsigned) [34] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::lower_bound(int const&) (234) mcount
Flat profile:
Each sample counts as 0.00195312 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
57.90 11.44 11.44 __mcount_internal
18.78 15.15 3.71 mcount
3.53 15.84 0.70 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_Rb_tree[in-charge](std::less<int> const&, std::allocator<std::pair<int const, int> > const&)
2.73 16.38 0.54 10000000 0.00 0.00 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::map[in-charge]()
2.58 16.89 0.51 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_empty_initialize()
2.27 17.34 0.45 10000000 0.00 0.00 create_and_fill(unsigned)
1.41 17.62 0.28 1 278.32 4412.11 test01()
1.20 17.86 0.24 10000000 0.00 0.00 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const
1.15 18.08 0.23 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::clear()
1.12 18.30 0.22 10000000 0.00 0.00 std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::_Rb_tree_base[not-in-charge](std::allocator<std::pair<int const, int> > const&)
0.92 18.48 0.18 10000000 0.00 0.00 std::allocator<std::pair<int const, int> >::~allocator [in-charge]()
0.87 18.66 0.17 10000000 0.00 0.00 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::~map [in-charge]()
0.77 18.81 0.15 10000000 0.00 0.00 std::less<int>::less[in-charge](std::less<int> const&)
0.70 18.95 0.14 10000000 0.00 0.00 std::allocator<std::pair<int const, int> >::allocator[in-charge]()
0.70 19.08 0.14 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const
0.66 19.21 0.13 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree [in-charge]()
0.63 19.34 0.12 10000000 0.00 0.00 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_Rb_tree_alloc_base[not-in-charge](std::allocator<std::pair<int const, int> > const&)
0.58 19.46 0.12 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_S_color(std::_Rb_tree_node_base*)
0.52 19.56 0.10 10000000 0.00 0.00 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_root() const
0.29 19.62 0.06 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::operator[](int const&)
0.25 19.67 0.05 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::insert(std::_Rb_tree_iterator<std::pair<int const, int>, std::pair<int const, int>&, std::pair<int const, int>*>, std::pair<int const, int> const&)
0.16 19.70 0.03 std::__simple_alloc<std::_Rb_tree_node<std::pair<int const, int> >, std::__default_alloc_template<(bool)1, (int)0> >::deallocate(std::_Rb_tree_node<std::pair<int const, int> >*, unsigned)
0.16 19.73 0.03 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_M_put_node(std::_Rb_tree_node<std::pair<int const, int> >*)
0.13 19.75 0.03 std::_Rb_tree_rotate_right(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&)
0.00 19.75 0.00 1 0.00 4412.11 main
% the percentage of the total running time of the
time program used by this function.
cumulative a running sum of the number of seconds accounted
seconds for by this function and those listed above it.
self the number of seconds accounted for by this
seconds function alone. This is the major sort for this
listing.
calls the number of times this function was invoked, if
this function is profiled, else blank.
self the average number of milliseconds spent in this
ms/call function per call, if this function is profiled,
else blank.
total the average number of milliseconds spent in this
ms/call function and its descendents per call, if this
function is profiled, else blank.
name the name of the function. This is the minor sort
for this listing. The index shows the location of
the function in the gprof listing. If the index is
in parenthesis it shows where it would appear in
the gprof listing if it were to be printed.
Call graph (explanation follows)
granularity: each sample hit covers 4 byte(s) for 0.04% of 4.61 seconds
index % time self children called name
0.00 4.41 1/1 __libc_start_main [3]
[1] 95.8 0.00 4.41 1 main [1]
0.28 4.13 1/1 test01() [2]
-----------------------------------------------
0.28 4.13 1/1 main [1]
[2] 95.8 0.28 4.13 1 test01() [2]
0.45 3.69 10000000/10000000 create_and_fill(unsigned) [4]
-----------------------------------------------
<spontaneous>
[3] 95.8 0.00 4.41 __libc_start_main [3]
0.00 4.41 1/1 main [1]
-----------------------------------------------
0.45 3.69 10000000/10000000 test01() [2]
[4] 89.7 0.45 3.69 10000000 create_and_fill(unsigned) [4]
0.54 2.24 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::map[in-charge]() [5]
0.17 0.36 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::~map [in-charge]() [8]
0.24 0.14 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const [9]
-----------------------------------------------
0.54 2.24 10000000/10000000 create_and_fill(unsigned) [4]
[5] 60.4 0.54 2.24 10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::map[in-charge]() [5]
0.70 1.23 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_Rb_tree[in-charge](std::less<int> const&, std::allocator<std::pair<int const, int> > const&) [6]
0.18 0.00 10000000/10000000 std::allocator<std::pair<int const, int> >::~allocator [in-charge]() [13]
0.14 0.00 10000000/10000000 std::allocator<std::pair<int const, int> >::allocator[in-charge]() [15]
-----------------------------------------------
0.70 1.23 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::map[in-charge]() [5]
[6] 41.7 0.70 1.23 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_Rb_tree[in-charge](std::less<int> const&, std::allocator<std::pair<int const, int> > const&) [6]
0.51 0.22 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_empty_initialize() [7]
0.22 0.12 10000000/10000000 std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::_Rb_tree_base[not-in-charge](std::allocator<std::pair<int const, int> > const&) [11]
0.15 0.00 10000000/10000000 std::less<int>::less[in-charge](std::less<int> const&) [14]
-----------------------------------------------
0.51 0.22 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_Rb_tree[in-charge](std::less<int> const&, std::allocator<std::pair<int const, int> > const&) [6]
[7] 15.8 0.51 0.22 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_empty_initialize() [7]
0.12 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_S_color(std::_Rb_tree_node_base*) [18]
0.10 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_root() const [19]
-----------------------------------------------
0.17 0.36 10000000/10000000 create_and_fill(unsigned) [4]
[8] 11.5 0.17 0.36 10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::~map [in-charge]() [8]
0.13 0.23 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree [in-charge]() [10]
-----------------------------------------------
0.24 0.14 10000000/10000000 create_and_fill(unsigned) [4]
[9] 8.1 0.24 0.14 10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const [9]
0.14 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const [16]
-----------------------------------------------
0.13 0.23 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::~map [in-charge]() [8]
[10] 7.7 0.13 0.23 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree [in-charge]() [10]
0.23 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::clear() [12]
-----------------------------------------------
0.22 0.12 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_Rb_tree[in-charge](std::less<int> const&, std::allocator<std::pair<int const, int> > const&) [6]
[11] 7.5 0.22 0.12 10000000 std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::_Rb_tree_base[not-in-charge](std::allocator<std::pair<int const, int> > const&) [11]
0.12 0.00 10000000/10000000 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_Rb_tree_alloc_base[not-in-charge](std::allocator<std::pair<int const, int> > const&) [17]
-----------------------------------------------
0.23 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree [in-charge]() [10]
[12] 4.9 0.23 0.00 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::clear() [12]
-----------------------------------------------
0.18 0.00 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::map[in-charge]() [5]
[13] 3.9 0.18 0.00 10000000 std::allocator<std::pair<int const, int> >::~allocator [in-charge]() [13]
-----------------------------------------------
0.15 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_Rb_tree[in-charge](std::less<int> const&, std::allocator<std::pair<int const, int> > const&) [6]
[14] 3.3 0.15 0.00 10000000 std::less<int>::less[in-charge](std::less<int> const&) [14]
-----------------------------------------------
0.14 0.00 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::map[in-charge]() [5]
[15] 3.0 0.14 0.00 10000000 std::allocator<std::pair<int const, int> >::allocator[in-charge]() [15]
-----------------------------------------------
0.14 0.00 10000000/10000000 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const [9]
[16] 3.0 0.14 0.00 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const [16]
-----------------------------------------------
0.12 0.00 10000000/10000000 std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::_Rb_tree_base[not-in-charge](std::allocator<std::pair<int const, int> > const&) [11]
[17] 2.7 0.12 0.00 10000000 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_Rb_tree_alloc_base[not-in-charge](std::allocator<std::pair<int const, int> > const&) [17]
-----------------------------------------------
0.12 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_empty_initialize() [7]
[18] 2.5 0.12 0.00 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_S_color(std::_Rb_tree_node_base*) [18]
-----------------------------------------------
0.10 0.00 10000000/10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_empty_initialize() [7]
[19] 2.2 0.10 0.00 10000000 std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_root() const [19]
-----------------------------------------------
<spontaneous>
[20] 1.3 0.06 0.00 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::operator[](int const&) [20]
-----------------------------------------------
<spontaneous>
[21] 1.1 0.05 0.00 std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::insert(std::_Rb_tree_iterator<std::pair<int const, int>, std::pair<int const, int>&, std::pair<int const, int>*>, std::pair<int const, int> const&) [21]
-----------------------------------------------
<spontaneous>
[22] 0.7 0.03 0.00 std::__simple_alloc<std::_Rb_tree_node<std::pair<int const, int> >, std::__default_alloc_template<(bool)1, (int)0> >::deallocate(std::_Rb_tree_node<std::pair<int const, int> >*, unsigned) [22]
-----------------------------------------------
<spontaneous>
[23] 0.7 0.03 0.00 std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_M_put_node(std::_Rb_tree_node<std::pair<int const, int> >*) [23]
-----------------------------------------------
<spontaneous>
[24] 0.6 0.03 0.00 std::_Rb_tree_rotate_right(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&) [24]
-----------------------------------------------
This table describes the call tree of the program, and was sorted by
the total amount of time spent in each function and its children.
Each entry in this table consists of several lines. The line with the
index number at the left hand margin lists the current function.
The lines above it list the functions that called this function,
and the lines below it list the functions this one called.
This line lists:
index A unique number given to each element of the table.
Index numbers are sorted numerically.
The index number is printed next to every function name so
it is easier to look up where the function in the table.
% time This is the percentage of the `total' time that was spent
in this function and its children. Note that due to
different viewpoints, functions excluded by options, etc,
these numbers will NOT add up to 100%.
self This is the total amount of time spent in this function.
children This is the total amount of time propagated into this
function by its children.
called This is the number of times the function was called.
If the function called itself recursively, the number
only includes non-recursive calls, and is followed by
a `+' and the number of recursive calls.
name The name of the current function. The index number is
printed after it. If the function is a member of a
cycle, the cycle number is printed between the
function's name and the index number.
For the function's parents, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the function into this parent.
children This is the amount of time that was propagated from
the function's children into this parent.
called This is the number of times this parent called the
function `/' the total number of times the function
was called. Recursive calls to the function are not
included in the number after the `/'.
name This is the name of the parent. The parent's index
number is printed after it. If the parent is a
member of a cycle, the cycle number is printed between
the name and the index number.
If the parents of the function cannot be determined, the word
`<spontaneous>' is printed in the `name' field, and all the other
fields are blank.
For the function's children, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the child into the function.
children This is the amount of time that was propagated from the
child's children to the function.
called This is the number of times the function called
this child `/' the total number of times the child
was called. Recursive calls by the child are not
listed in the number after the `/'.
name This is the name of the child. The child's index
number is printed after it. If the child is a
member of a cycle, the cycle number is printed
between the name and the index number.
If there are any cycles (circles) in the call graph, there is an
entry for the cycle-as-a-whole. This entry shows who called the
cycle (as parents) and the members of the cycle (as children.)
The `+' recursive calls entry shows the number of function calls that
were internal to the cycle, and the calls entry for each member shows,
for that member, how many times it was called from other members of
the cycle.
Index by function name
[4] create_and_fill(unsigned) (gmon-start.c) [23] std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_M_put_node(std::_Rb_tree_node<std::pair<int const, int> >*) [18] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_S_color(std::_Rb_tree_node_base*)
[2] test01() [17] std::_Rb_tree_alloc_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> >, (bool)1>::_Rb_tree_alloc_base[not-in-charge](std::allocator<std::pair<int const, int> > const&) [6] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_Rb_tree[in-charge](std::less<int> const&, std::allocator<std::pair<int const, int> > const&)
[9] std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const [21] std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::insert(std::_Rb_tree_iterator<std::pair<int const, int>, std::pair<int const, int>&, std::pair<int const, int>*>, std::pair<int const, int> const&) [10] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::~_Rb_tree [in-charge]()
[16] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::size() const [5] std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::map[in-charge]() [24] std::_Rb_tree_rotate_right(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&)
[19] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_root() const [8] std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::~map [in-charge]() (2486) __mcount_internal
[15] std::allocator<std::pair<int const, int> >::allocator[in-charge]() [20] std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >::operator[](int const&) [1] main
[13] std::allocator<std::pair<int const, int> >::~allocator [in-charge]() [14] std::less<int>::less[in-charge](std::less<int> const&) (220) mcount
[11] std::_Rb_tree_base<std::pair<int const, int>, std::allocator<std::pair<int const, int> > >::_Rb_tree_base[not-in-charge](std::allocator<std::pair<int const, int> > const&) [7] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::_M_empty_initialize()
[22] std::__simple_alloc<std::_Rb_tree_node<std::pair<int const, int> >, std::__default_alloc_template<(bool)1, (int)0> >::deallocate(std::_Rb_tree_node<std::pair<int const, int> >*, unsigned) [12] std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::clear()