symbol_container Class Reference

An arbitrary container of symbols. More...

#include <symbol_container.h>

List of all members.

Public Types

typedef std::set< symbol_entry,
less_symbol
symbols_t
 container type
typedef symbols_t::size_type size_type

Public Member Functions

size_type size () const
 return the number of symbols stored
symbol_entry const * insert (symbol_entry const &)
 Insert a new symbol.
symbol_collection const find (debug_name_id filename, size_t linenr) const
 find the symbols at the given filename and line number, if any
symbol_collection const find (debug_name_id filename) const
 find the symbols defined in the given filename, if any
symbol_entry const * find_by_vma (std::string const &image_name, bfd_vma vma) const
 find the symbol with the given image_name vma if any
symbol_entry const * find (symbol_entry const &symbol) const
 Search a symbol. Return NULL if not found.
symbols_t::iterator begin ()
 return start of symbols
symbols_t::iterator end ()
 return end of symbols

Detailed Description

An arbitrary container of symbols.

Supports lookup by name, by VMA, and by file location.

Lookup by name or by VMA is O(n). Lookup by file location is O(log(n)).


Member Typedef Documentation

typedef symbols_t::size_type symbol_container::size_type

container type


Member Function Documentation

symbol_container::symbols_t::iterator symbol_container::begin (  ) 

return start of symbols

symbol_container::symbols_t::iterator symbol_container::end (  ) 

return end of symbols

symbol_entry const * symbol_container::find ( symbol_entry const &  symbol  )  const

Search a symbol. Return NULL if not found.

symbol_collection const symbol_container::find ( debug_name_id  filename  )  const

find the symbols defined in the given filename, if any

References sample_entry::file_loc, file_location::filename, file_location::linenr, and symbol_entry::sample.

symbol_collection const symbol_container::find ( debug_name_id  filename,
size_t  linenr 
) const

find the symbols at the given filename and line number, if any

References sample_entry::file_loc, file_location::filename, file_location::linenr, and symbol_entry::sample.

symbol_entry const* symbol_container::find_by_vma ( std::string const &  image_name,
bfd_vma  vma 
) const

find the symbol with the given image_name vma if any

symbol_entry const * symbol_container::insert ( symbol_entry const &  symb  ) 

Insert a new symbol.

If the symbol already exists in the container, then the sample counts are accumulated. Returns the newly created symbol or the existing one. This pointer remains valid during the whole life time of a symbol_container object and is warranted unique according to less_symbol comparator. Can only be done before any file-location based lookups, since the two lookup methods are not synchronised.

References sample_entry::counts, and symbol_entry::sample.

symbol_container::size_type symbol_container::size (  )  const

return the number of symbols stored


The documentation for this class was generated from the following files:

Generated on 29 Jul 2013 for oprofile by  doxygen 1.6.1