To collect and view detailed information on function call and block statistics, compile with the -qshowpdf option and then use the showpdf utility. The following example shows how you can use profile-directed feedback (PDF) with the showpdf utility to view the call and block statistics for a Hello World application.
#include <stdio.h>
void HelloWorld()
{
printf("Hello World");
}
main()
{
HelloWorld();
return 0;
}
xlc -qpdf1 -qshowpdf -O hello.c
showpdf -f instr1
HelloWorld(4): 1 (hello.c) Call Counters: 5 | 1 printf(6) Call coverage = 100% ( 1/1 ) Block Counters: 3-5 | 1 6 | 6 | 1 Block coverage = 100% ( 2/2 ) ----------------------------------- main(5): 1 (hello.c) Call Counters: 10 | 1 HelloWorld(4) Call coverage = 100% ( 1/1 ) Block Counters: 8-11 | 1 11 | Block coverage = 100% ( 1/1 ) Total Call coverage = 100% ( 2/2 ) Total Block coverage = 100% ( 3/3 )