From c718a4172874a4b539af2ca9697ebe4142fe996c Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Fri, 11 Oct 2013 14:43:35 +0900 Subject: [PATCH] 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. --- src/lib/eet/eet_data.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/eet/eet_data.c b/src/lib/eet/eet_data.c index 23d5504661..e4a0d26d68 100644 --- a/src/lib/eet/eet_data.c +++ b/src/lib/eet/eet_data.c @@ -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; }