Boost logo

Boost Users :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2007-06-27 14:06:33


On Jun 27, 2007, at 1:51 PM, Ewgenij Sokolovski wrote:

> Hello, I use the boost graph library (Version 1.33.1 of Boost) for
> my programming task. I wanted to profile my program with gprof. I
> compilated the source code with the -pg option and linked it also
> with that option. Now I'm examining the output file of gprof. Some
> functions of boost graph library are not explicitly listed there
> althogh I use them. These functions are:
>
> vertices()
> add_edge()
>
> What I see instead are some complicated functions. I have copied
> them here from my gprof-Output. But where are vertices() and
> add_edge()? Or are they meant by these complicated functions.

Profiling the BGL can be a scary exercise, as you've found... let's
see if we can identify what these are:

> 1) std::pair<std::vector<boost::detail::sei_<unsigned long,
> std::_List_iterator<boost::list_edge<unsigned long,
> boost::property<boost::edge_bundle_t, float, boost::no_property> >
> >, boost::property<boost::edge_bundle_t, float, boost::no_property>
> >, std::allocator<boost::detail::sei_<unsigned long,
> std::_List_iterator<boost::list_edge<unsigned long,
> boost::property<boost::edge_bundle_t, float, boost::no_property> >
> >, boost::property<boost::edge_bundle_t, float, boost::no_property>
> > > >::iterator, bool>
> boost::graph_detail::push<std::vector<boost::detail::sei_<unsigned
> long, std::_List_iterator<boost::list_edge<unsigned long,
> boost::property<boost::edge_bundle_t, float, boost::no_property> >
> >, boost::property<boost::edge_bundle_t, float, boost::no_property>
> >, std::allocator<boost::detail::sei_<unsigned long,
> std::_List_iterator<boost::list_edge<unsigned long,
> boost::property<boost::edge_bundle_t, float, boost::no_property> >
> >, boost::property<boost::edge_bundle_t, float, boost::no_property>
> > > >, boost::detail::sei_<unsigned long,
> std::_List_iterator<boost::list_edge<unsigned long,
> boost::property<boost::edge_bundle_t, float, boost::no_property> >
> >, boost::property<boost::edge_bundle_t, float, boost::no_property>
> > >(std::vector<boost::detail::sei_<unsigned long,
> std::_List_iterator<boost::list_edge<unsigned long,
> boost::property<boost::edge_bundle_t, float, boost::no_property> >
> >, boost::property<boost::edge_bundle_t, float, boost::no_property>
> >, std::allocator<boost::detail::sei_<unsigned long,
> std::_List_iterator<boost::list_edge<unsigned long,
> boost::property<boost::edge_bundle_t, float, boost::no_property> >
> >, boost::property<boost::edge_bundle_t, float, boost::no_property>
> > > >&, boost::detail::sei_<unsigned long,
> std::_List_iterator<boost::list_edge<unsigned long,
> boost::property<boost::edge_bundle_t, float, boost::no_property> >
> >, boost::property<boost::edge_bundle_t, float, boost::no_property>
> > const&)

The is one of the routines called by add_edge, named
boost::graph_detail::push, which adds an element to a container.

> 2)
> boost::detail::postfix_increment_result<boost::counting_iterator<unsig
> ned long, boost::use_default, boost::use_default>, unsigned long,
> unsigned long const&, boost::random_access_traversal_tag>::type
> boost::operator++<boost::counting_iterator<unsigned long,
> boost::use_default, boost::use_default>, unsigned long,
> boost::random_access_traversal_tag, unsigned long const&, long>
> (boost::iterator_facade<boost::counting_iterator<unsigned long,
> boost::use_default, boost::use_default>, unsigned long,
> boost::random_access_traversal_tag, unsigned long const&, long>&, int)

This is the increment operator for the vertex_iterator type. I expect
that this is just noise, because this routine would normally just
inline to a single call to the increment operator for unsigned longs.

   - Doug


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net