profile mode: statistics for vector and map

Gedare Bloom gedare@rtems.org
Tue May 7 18:14:00 GMT 2013


Hi,

The attached patch offers a start at the Statistics aspect of
libstdc++ profile mode. So far it implements vector and map statistics
for size (redundant/deprecates existing vector size) and common
operation counts. There are macros for turning on/off the vector and
map statistics individually, e.g.
_GLIBCXX_PROFILE_NO_VECTOR_STATISTICS and _NO_MAP_STATISTICS.

Some improvements could be made still or remain for the future, such as:
* Use the _GLIBCXX_PROFILE_STATISTICS flag to turn on/off all statistics
* Cost heuristics or high resolution timers to get the costs of operations
* There were some problems with iterators, though I forget the specifics.
* More containers supported and tested.

I have not done extensive testing on this version of the code. This
work was done previously on 4.7.1 with x86_64. I made some effort to
rebase this patch from Francois' unordered map patch. Hopefully there
are no conflicts remaining.

2013-05-07  Gedare Bloom <gedare@rtems.org>

    * include/profile/impl/profiler_container_statistics.h: New.
    * include/profile/impl/profiler_vector_statistics.h: New.
    * include/profile/impl/profiler_map_statistics.h: New.
    * include/Makefile.am: Add new profile headers.
    * include/Makefile.in: Regenerate.
    * include/profile/impl/profiler.h: New macros for
    __profcxx_vector_statistics and __profcxx_map_statistics.
    * include/profile/impl/profiler_trace.h: Class and function declarations
    for std::profile::__trace_vector_statistics and
    std::profile::__trace_map_statistics.
    * include/profile/map.h: Use __profcxx_map_statistics macros.
    * include/profile/vector: Use __profcxx_vector_statistics macros.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-profile-mode-Add-Statistics-for-vector-and-map.patch
Type: application/octet-stream
Size: 53349 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130507/f60c9a7e/attachment.obj>


More information about the Gcc-patches mailing list