cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c718a4172874a4b539af2ca9697ebe4142fe996c

commit c718a4172874a4b539af2ca9697ebe4142fe996c
Author: Cedric Bail <cedric.b...@samsung.com>
Date:   Fri Oct 11 14:43:35 2013 +0900

    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 23d5504..e4a0d26 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;
 }
 

-- 


Reply via email to