2.13. Controlling Entry/Exit Hooks

The tiarmclang compiler tools do not support entry/exit hooks in the same way as the armcl compiler. However, tiarmclang does support an -finstrument-functions option, which inserts calls to __cyg_profile_func_enter() and __cyg_profile_func_exit() at the entry and exit of each function. This feature has not been adequately tested and may be problematic for C++ applications.

armcl Option

tiarmclang Option

--entry_hook=<func>

-finstrument_functions

The armcl compiler’s --entry_hook option allows you to specify the name of a function to be called on entry.

The tiarmclang compiler provides the capability to instrument functions via its -finstrument-functions option, inserting a call to __cyg_profile_func_enter() at the entry of each function defined in a compilation unit. While the tiarmclang compiler does not provide an option to allow you to name the entry function, the definition of __cyg_profile_func_enter() can be customized to serve as an entry hook function.

The tiarmclang compiler tools package does not provide an implementation of the __cyg_profile_func_enter(). If you specify the -finstrument_functions option on the command-line, you will need to supply a definition of the __cyg_profile_func_enter() function to be linked with your application.

See Function Entry/Exit Hook Options for more information about tiarmclang’s -finstrument-functions option.

armcl Option

tiarmclang Option

--entry_parm=<none|name|address>

not supported

When using entry hook functions with the armcl compiler, you can pass the name or the address of the calling function as an argument to the entry hook function.

The tiarmclang compiler does not support an analogous capability.

armcl Option

tiarmclang Option

--exit_hook=<func>

-finstrument_functions

The armcl compiler’s --exit_hook option allows you to specify the name of a function to be called before exiting.

The tiarmclang compiler provides the capability to instrument functions via its -finstrument-functions option, inserting a call to __cyg_profile_func_exit() prior to exiting from each function defined in a compilation unit. While the tiarmclang compiler does not provide an option to allow you to name the entry function, the definition of __cyg_profile_func_exit() can be customized.

The tiarmclang compiler tools package does not provide an implementation of the __cyg_profile_func_exit(). If you specify the -finstrument_functions option on the command-line, you will need to supply a definition of the __cyg_profile_func_exit() function to be linked with your application.

See Function Entry/Exit Hook Options for more information about tiarmclang’s -finstrument-functions option.

armcl Option

tiarmclang Option

--exit_parm=<none|name|address>

not supported

When using exit hook functions with the armcl compiler, you can pass the name or the address of the calling function as an argument to the exit hook function.

The tiarmclang compiler does not support an analogous capability.

armcl Option

tiarmclang Option

--remove_hooks_when_inlining

not supported

If the armcl compiler inlines a function, the --remove_hooks_when_inlining option can be used to remove entry/exit hook function calls from the inlined function.

The tiarmclang compiler does not provide an analogous option.