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."
61 alloc_format_t const format_mask = (show_time|show_path|show_objectfile|show_function|show_allthreads);
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;
89 class alloc_filter_ct {
96 friend class ::libcwd::dm_alloc_base_ct;
97 friend class ::libcwd::dm_alloc_copy_ct;
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;
112 static struct timeval const no_time_limit;
120 struct timeval get_time_start() const;
122 struct timeval get_time_end() const;
128 std::vector<std::string> get_objectfile_list()
const;
134 std::vector<std::string> get_sourcefile_list()
const;
140 std::vector<std::pair<std::string, std::string> > get_function_list()
const;
151 void set_time_interval(
struct timeval
const& start,
struct timeval
const& end);
162 void hide_objectfiles_matching(std::vector<std::string>
const& masks);
172 void hide_sourcefiles_matching(std::vector<std::string>
const& masks);
191 void hide_functions_matching(std::vector<std::pair<std::string, std::string> >
const& masks);
200 void hide_untagged_allocations(
bool hide =
true) {
if (hide) M_flags |= hide_untagged;
else M_flags &= ~hide_untagged; }
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;
221 friend class marker_ct;
224 void M_check_synchronization()
const {
if (M_id != S_id) M_synchronize(); }
225 void M_synchronize()
const;
226 void M_synchronize_locations()
const;
A memory allocation marker.
Definition: class_marker.h:33
unsigned long list_allocations_on(debug_ct &debug_object)
List all current allocations to a given debug object.
Definition: debugmalloc.cc:3020
namespace for libcwd.
Definition: debug.cc:87