Instrument specific set of functions - Unix

This is a discussion on Instrument specific set of functions - Unix ; hi, Is there any way to instrument specific set of functions using gcc - finstrument_function option.I see by using this option the whole code will be instrumented. You can avoid a function being instrumented by using attribute 'no_instrument_function". My code ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Instrument specific set of functions

  1. Instrument specific set of functions

    hi,
    Is there any way to instrument specific set of functions using gcc -
    finstrument_function
    option.I see by using this option the whole code will be instrumented.
    You can
    avoid a function being instrumented by using attribute
    'no_instrument_function".

    My code is arranged in the following way;

    parent_folder\
    - a\
    - b\
    - c\

    folders a,b and c has C source and header files. Here i need to
    instrument the functions
    present only in folder "b", how can i do that; More over the functions
    in "b" might call functions
    in "a" or "c", they need to be instrumented as well.Is there any good
    way of doing this.
    Please point some other features of GCC if there are any.
    btw, i am using GCC version 3.4.6 on a 2.6 linux kernel.

    thanks
    sinbad

  2. Re: Instrument specific set of functions

    sinbad wrote:

    > Is there any way to instrument specific set of functions using gcc
    > finstrument_function option.


    Would it not make sense to use oprofile ?
    http://oprofile.sourceforge.net/about/

+ Reply to Thread