Displaying 2 results from an estimated 2 matches for "this_fn".
Did you mean:
this_fs
2017 Jul 13
2
How to add custom instrumentation?
Hi everyone,
I run some functions using ORC JIT, now I need to add custom instrumentation.
I want to add two callbacks to each function: ‘enterFunction' at the beginning and ‘leaveFunction' at the end.
Intuition says that I could ‘just' insert CallInst's to the first and the last basic blocks in the function.
Am I correct? Are there any other/better way to do this? Is there
2017 Jul 13
2
How to add custom instrumentation?
...Riordan, Martin <martin.oriordan at intel.com> wrote:
>
> The '-finstrument-functions' option may already be sufficient for your needs.
>
> When selected this inserts the following two calls on entry-to and exit-from a function:
>
> __cyg_profile_func_enter(void* this_fn, void* call_site)
> __cyg_profile_func_exit(void* this_fn, void* call_site)
>
> You can then provide a custom implementation of these calls to perform the analysis tasks that you require.
>
> The two parameters are the address of the function into which the instrumentation is inse...