eet: log size of subtype added to an Eet_Data_Descriptor.

This is really useful to track down a leak of a memory piece allocated by an
eet_data function. If you know the size of the leaked structure (valgrind
give you the total allocated size and the number of structure in it, so you
need to divide before having the right number), you just need to do :
EINA_LOG_LEVELS=eet:3 my_app 2>&1 | grep the_size

And there will be very few line matching reducing what you should be looking at.
This commit is contained in:
Cedric Bail 2013-10-11 14:43:35 +09:00
parent 7caef271dc
commit c718a41728
1 changed files with 5 additions and 0 deletions

View File

@ -2240,6 +2240,11 @@ eet_data_descriptor_element_add(Eet_Data_Descriptor *edd,
/* ede->counter_offset = counter_offset; */
ede->counter_name = counter_name;
if (subtype)
INF("Adding '%s' of size %i to '%s' at offset %i.",
subtype->name, subtype->size,
edd->name, offset);
ede->subtype = subtype;
}