Bug 422679 - Support suppression file for --alloc-fn arguments to massif
Summary: Support suppression file for --alloc-fn arguments to massif
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: massif (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Nicholas Nethercote
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-09 15:41 UTC by Philip Withnall
Modified: 2020-06-09 15:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Withnall 2020-06-09 15:41:01 UTC
Just like memcheck supports suppression files to hide known/intentional memory leaks, it would be useful if massif supported suppression files to provide --alloc-fn arguments for common malloc() wrappers.

For example, I run massif for GLib applications using the following:

--alloc-fn=g_malloc --alloc-fn=g_object_new --alloc-fn=g_malloc0 --alloc-fn=g_malloc0_n --alloc-fn=g_malloc_n --alloc-fn=g_realloc --alloc-fn=g_realloc_n --alloc-fn=g_slice_alloc --alloc-fn=g_slice_alloc0 --alloc-fn=g_type_create_instance --alloc-fn=g_object_new_internal --alloc-fn=g_object_new_with_properties --alloc-fn=g_object_newv --alloc-fn=g_object_new_valist --alloc-fn=g_try_malloc --alloc-fn=g_try_malloc_n --alloc-fn=g_hash_table_realloc_key_or_value_array --alloc-fn=realloc_arrays --alloc-fn=g_hash_table_resize --alloc-fn=g_hash_table_maybe_resize --alloc-fn=g_hash_table_insert_node --alloc-fn=g_hash_table_insert_internal --alloc-fn=g_hash_table_setup_storage

just so that various internal GLib wrappers around malloc() are ignored and the output focuses on the code which is calling them.

It would be more convenient to be able to put these arguments in the shared suppression file which GLib already installs for memcheck, so that users of GLib don’t have to reinvent this list for themselves. Thanks.