Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - profiling usage of libc: (6 Items)
   
profiling usage of libc  
I want to  analize libc usage of a certain binary,
but I can't find an instrumented libc.so.
so is there any other way than writing a LD_PRELOAD libc wrapper to get the -finstrument-functions in libc?

TIA
hp
Re: profiling usage of libc  
You could compile libc with -finstrument-functions, but you might have to be careful that any functions that 
libprofiling uses don't cause a recursive loop-o-death!

Hans-Peter Reichert wrote:
> I want to  analize libc usage of a certain binary,
> but I can't find an instrumented libc.so.
> so is there any other way than writing a LD_PRELOAD libc wrapper to get the -finstrument-functions in libc?
> 
> TIA
> hp
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post36246
> 

-- 
cburgess@qnx.com
AW: profiling usage of libc  
:-/ I should add the answers I don't like to hear to my posts 


>-----Ursprüngliche Nachricht-----
>Von: Colin Burgess [mailto:community-noreply@qnx.com] 
>Gesendet: Mittwoch, 19. August 2009 17:04
>An: general-ide
>Betreff: Re: profiling usage of libc
>
>You could compile libc with -finstrument-functions, but you 
>might have to be careful that any functions that libprofiling 
>uses don't cause a recursive loop-o-death!
>
>Hans-Peter Reichert wrote:
>> I want to  analize libc usage of a certain binary, but I 
>can't find an 
>> instrumented libc.so.
>> so is there any other way than writing a LD_PRELOAD libc 
>wrapper to get the -finstrument-functions in libc?
>> 
>> TIA
>> hp
>> 
>> 
>> 
>> _______________________________________________
>> 
>> General
>> http://community.qnx.com/sf/go/post36246
>> 
>
>--
>cburgess@qnx.com
>
>
>
>_______________________________________________
>
>General
>http://community.qnx.com/sf/go/post36271
>
> 
 
*******************************************
Harman Becker Automotive Systems GmbH
Management Board: Dr. Klaus Blickle (Chairman), Dr. Udo Hüls, Michael Mauser
Chairman of the Supervisory Board: Ansgar Rempp | Domicile: Karlsbad | 
Local Court Mannheim: Register No. 361395

 
*******************************************
Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat 
sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und loeschen Sie diese Mail
. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have 
received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the contents in this e-mail is strictly forbidden.
*******************************************
Re: AW: profiling usage of libc  
On Wed, 19 Aug 2009, Hans-Peter Reichert wrote:

>Date: Wed, 19 Aug 2009 11:14:16 -0400 (EDT)
>From: Hans-Peter Reichert <community-noreply@qnx.com>
>Reply-To: post36279@community.qnx.com
>To: general-ide <post36279@community.qnx.com>
>Subject: AW: profiling usage of libc
>
> :-/ I should add the answers I don't like to hear to my posts
>

Isn't it just avoiding passing those compile options to the lib/c/prof
section of the code?

Peter

>
>> -----Ursprüngliche Nachricht-----
>> Von: Colin Burgess [mailto:community-noreply@qnx.com]
>> Gesendet: Mittwoch, 19. August 2009 17:04
>> An: general-ide
>> Betreff: Re: profiling usage of libc
>>
>> You could compile libc with -finstrument-functions, but you might have to be
>> careful that any functions that libprofiling uses don't cause a recursive
>> loop-o-death!
>>
>> Hans-Peter Reichert wrote:
>>> I want to  analize libc usage of a certain binary, but I can't find an
>>> instrumented libc.so.  so is there any other way than writing a LD_PRELOAD
>>> libc wrapper to get the -finstrument-functions in libc?
>>>
>>> TIA
>>> hp
Re: AW: profiling usage of libc  
PR37662 tracks the fact that this would be "nice to do".

So many nice things to do, why must people load me up with "must do" PRs instead! ;-)

Peter Martin wrote:
> On Wed, 19 Aug 2009, Hans-Peter Reichert wrote:
> 
>> Date: Wed, 19 Aug 2009 11:14:16 -0400 (EDT)
>> From: Hans-Peter Reichert <community-noreply@qnx.com>
>> Reply-To: post36279@community.qnx.com
>> To: general-ide <post36279@community.qnx.com>
>> Subject: AW: profiling usage of libc
>>
>> :-/ I should add the answers I don't like to hear to my posts
>>
> 
> Isn't it just avoiding passing those compile options to the lib/c/prof
> section of the code?
> 
> Peter
> 
>>> -----Ursprüngliche Nachricht-----
>>> Von: Colin Burgess [mailto:community-noreply@qnx.com]
>>> Gesendet: Mittwoch, 19. August 2009 17:04
>>> An: general-ide
>>> Betreff: Re: profiling usage of libc
>>>
>>> You could compile libc with -finstrument-functions, but you might have to be
>>> careful that any functions that libprofiling uses don't cause a recursive
>>> loop-o-death!
>>>
>>> Hans-Peter Reichert wrote:
>>>> I want to  analize libc usage of a certain binary, but I can't find an
>>>> instrumented libc.so.  so is there any other way than writing a LD_PRELOAD
>>>> libc wrapper to get the -finstrument-functions in libc?
>>>>
>>>> TIA
>>>> hp
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post36284

-- 
cburgess@qnx.com
Re: profiling usage of libc  
Compiling whole libc with  -finstrument-functions would definitely cause 
problems but if you are interested in specific function, you can try to 
do it yourself
by checking out libc from svn and changing makefile flags to compile 
SPECIFIC files
with this option.

Colin Burgess wrote:
> You could compile libc with -finstrument-functions, but you might have to be careful that any functions that 
libprofiling uses don't cause a recursive loop-o-death!
>
> Hans-Peter Reichert wrote:
>   
>> I want to  analize libc usage of a certain binary,
>> but I can't find an instrumented libc.so.
>> so is there any other way than writing a LD_PRELOAD libc wrapper to get the -finstrument-functions in libc?
>>
>> TIA
>> hp
>>
>>
>>
>> _______________________________________________
>>
>> General
>> http://community.qnx.com/sf/go/post36246
>>
>>     
>
>