Count Trampolines
From Texas Instruments Embedded Processors Wiki
Translate this page to
To count the number of trampolines that occur in your code, run the following command from a Windows DOS prompt ...
C:\> type file.map | perl -0777 -ne "s/^.*FAR CALL TRAMPOLINES\s*//s; s/\n\s*\n.*$//s; foreach (split/\n/) { ++$cnt if (m/[0-9a-f]{8}/); } print $cnt;"
Or this command from a Unix prompt ...
% cat file.map | perl -0777 -ne 's/^.*FAR CALL TRAMPOLINES\s*//s; s/\n\s*\n.*$//s; foreach (split/\n/) { ++$cnt if (m/[0-9a-f]{8}/); } print $cnt;'
Replace file.map with the name of your linker map file. A linker map file is created with the linker option -m file.
If there are no trampolines in your code, these commands produce no output.
Leave a Comment