Main Page   Reference Manual   Namespace List   Compound List   Namespace Members   Compound Members   File Members  

libcwd::ooam_filter_ct Class Reference
[Format Of The Overview Of Allocated Memory]

#include <libcwd/debug.h>

List of all members.

Public Member Functions

 ooam_filter_ct (ooam_format_t flags=0)
 Construct a formatting object.

void set_flags (ooam_format_t flags)
 Set the general formatting flags.

ooam_format_t get_flags (void) const
 Returns the flags as set with set_flags.

timeval get_time_start (void) const
 Returns the start time as passed with set_time_interval.

timeval get_time_end (void) const
 Returns the end time as passed with set_time_interval.

std::vector< std::string > get_objectfile_list (void) const
 Returns the list of object file masks.

std::vector< std::string > get_sourcefile_list (void) const
 Returns the list of source file masks.

void set_time_interval (struct timeval const &start, struct timeval const &end)
 Select the time interval that should be shown.

void hide_objectfiles_matching (std::vector< std::string > const &masks)
 Select which object files to hide in the Allocated Memory Overview.

void hide_sourcefiles_matching (std::vector< std::string > const &masks)
 Select which source files to hide in the Allocated Memory Overview.

void hide_untagged_allocations (bool hide=true)
 Only show the allocations for which a AllocTag was added in the code.

void hide_unknown_locations (bool hide=true)
 Only show the allocations for which a source file and line number could be found.


Static Public Attributes

timeval const  no_time_limit

Friends

void list_allocations_on (debug_ct &, ooam_filter_ct const &)
 List all current allocations to a given debug object using a specified format.


Detailed Description

The object passed to list_allocations_on containing formatting information for the Overview Of Allocated Memory .


Member Function Documentation

void libcwd::ooam_filter_ct::hide_objectfiles_matching std::vector< std::string > const &  masks  ) 
 

Select which object files to hide in the Allocated Memory Overview.

masks is a list of wildcard expressions ('*' matches anything) that are matched against the name of the executable and all the shared library names (without their path). Object files that match will be hidden from the overview of allocated memory .

See also:
group_alloc_format

void libcwd::ooam_filter_ct::hide_sourcefiles_matching std::vector< std::string > const &  masks  ) 
 

Select which source files to hide in the Allocated Memory Overview.

masks is a list of wildcard expressions ('*' matches anything) that are matched against the source file, including path, of the location where the allocation took place. Locations that match will be hidden from the overview of allocated memory .

See also:
group_alloc_format

void libcwd::ooam_filter_ct::hide_unknown_locations bool  hide = true  )  [inline]
 

Only show the allocations for which a source file and line number could be found.

When hide is true, only allocations for which a location could be resolved are shown. This is the only way to get rid of allocations done in libraries without debugging information like a stripped glibc.

void libcwd::ooam_filter_ct::hide_untagged_allocations bool  hide = true  )  [inline]
 

Only show the allocations for which a AllocTag was added in the code.

When hide is true, only allocations for which an AllocTag was seen are showed in the overview of allocated memory otherwise all allocations are being showed.

void libcwd::ooam_filter_ct::set_time_interval struct timeval const &  start,
struct timeval const &  end
 

Select the time interval that should be shown.

The time interval outside of which allocations will not be shown in the allocated memory overview. start is the earliest time shown while end is the last time shown.

See also:
group_alloc_format


Friends And Related Function Documentation

void list_allocations_on debug_ct debug_object,
ooam_filter_ct const &  filter
[friend]
 

List all current allocations to a given debug object using a specified format.

With CWDEBUG_ALLOC set to 1, it is possible to write the overview of allocated memory to a Debug Object.

For example:

 Debug(
   ooam_filter_ct ooam_filter(show_objectfile);
   std::vector<std::string> masks;
   masks.push_back("libc.so*");
   masks.push_back("libstdc++*");
   ooam_filter.hide_objectfiles_matching(masks);
   ooam_filter.hide_unknown_locations();
   list_allocations_on(libcw_do, ooam_filter)
 );

which would print on libcw_do using debug channel dc::malloc , not showing allocations that belong to shared libraries matching "libc.so*" or "libstdc++*". The remaining items would show which object file (shared library name or the executable name) they belong to, because we used show_objectfile as flag.

See also:
group_alloc_format


Member Data Documentation

struct timeval const libcwd::ooam_filter_ct::no_time_limit [static]
 

The timeval used when there is no actual limit set, either start or end.

Copyright © 2001 - 2004 Carlo Wood.  All rights reserved.