18 #ifndef LIBCWD_CLASS_ALLOC_FILTER_H 19 #define LIBCWD_CLASS_ALLOC_FILTER_H 21 #ifndef LIBCWD_LIBRARIES_DEBUG_H 22 #error "Don't include <libcwd/class_alloc_filter.h> directly, include the appropriate \"debug.h\" instead." 42 #endif // CWDEBUG_ALLOC 61 alloc_format_t
const format_mask = (show_time|show_path|show_objectfile|show_function|
show_allthreads);
65 #endif // CWDEBUG_ALLOC 71 unsigned int const hide_untagged = 32;
72 unsigned int const hide_unknown_loc = 64;
74 class dm_alloc_base_ct;
75 class dm_alloc_copy_ct;
91 #if CWDEBUG_LOCATION // No synchronization needed when not defined. 96 friend class ::libcwd::dm_alloc_base_ct;
97 friend class ::libcwd::dm_alloc_copy_ct;
98 alloc_format_t M_flags;
99 struct timeval M_start;
100 struct timeval M_end;
102 typedef std::basic_string<char, std::char_traits<char>, _private_::auto_internal_allocator> string_type;
103 typedef std::vector<string_type, _private_::auto_internal_allocator::rebind<string_type>::other> vector_type;
104 vector_type M_objectfile_masks;
105 vector_type M_sourcefile_masks;
106 typedef std::vector<std::pair<string_type, string_type>,
107 _private_::auto_internal_allocator::rebind<std::pair<string_type, string_type> >::other> vector_pair_type;
108 vector_pair_type M_function_masks;
208 void hide_unknown_locations(
bool hide =
true) {
if (hide) M_flags |= hide_unknown_loc;
else M_flags &= ~hide_unknown_loc; }
212 _private_::hidden_st check_hide(
char const* filepath)
const;
215 _private_::hidden_st check_hide(
object_file_ct const* object_file,
char const* mangled_function_name)
const;
224 void M_check_synchronization()
const {
if (M_id != S_id) M_synchronize(); }
225 void M_synchronize()
const;
226 void M_synchronize_locations()
const;
230 #endif // CWDEBUG_ALLOC 234 #endif // LIBCWD_CLASS_ALLOC_FILTER_H struct timeval get_time_start() const
Returns the start time as passed with set_time_interval.
The Debug Object class, this object represents one output device (ostream).
Definition: class_debug.h:77
void set_time_interval(struct timeval const &start, struct timeval const &end)
Select the time interval that should be shown.
A memory allocation marker.
Definition: class_marker.h:33
void hide_functions_matching(std::vector< std::pair< std::string, std::string > > const &masks)
Select which object-file/function pairs to hide in the Allocator Memory Overview. ...
An allocated-memory filter class.An object of this type can be passed to list_allocations_on containi...
Definition: class_alloc_filter.h:89
friend unsigned long list_allocations_on(debug_ct &, alloc_filter_ct const &)
List all current allocations to a given debug object using a specified format.With CWDEBUG_ALLOC set...
Definition: debugmalloc.cc:3034
An object representing the main executable or a shared library.
Definition: class_object_file.h:52
alloc_format_t get_flags() const
Returns the flags as set with set_flags.
std::vector< std::pair< std::string, std::string > > get_function_list() const
Return a copy of the list of object-file/function pair masks.
void hide_untagged_allocations(bool hide=true)
Only show the allocations for which a AllocTag was added in the code.
Definition: class_alloc_filter.h:200
std::vector< std::string > get_sourcefile_list() const
Returns a copy of the list of source file masks.
namespace for libcwd.
Definition: debug.cc:87
struct timeval get_time_end() const
Returns the end time as passed with set_time_interval.
void hide_sourcefiles_matching(std::vector< std::string > const &masks)
Select which source files to hide in the Allocated Memory Overview.
alloc_filter_ct(alloc_format_t flags=0)
Construct a formatting object.
void set_flags(alloc_format_t flags)
Set the general formatting flags.
std::vector< std::string > get_objectfile_list() const
Returns a copy of the list of object file masks.
void hide_objectfiles_matching(std::vector< std::string > const &masks)
Select which object files to hide in the Allocated Memory Overview.
void hide_unknown_locations(bool hide=true)
Only show the allocations for which a source file and line number could be found. ...
Definition: class_alloc_filter.h:208
static struct timeval const no_time_limit
Definition: class_alloc_filter.h:112