-qshowpdf

Description

Used with -qpdf1 and a minimum optimization level of -O to add additional call and block count profiling information to an executable.

Syntax

Read syntax diagramSkip visual syntax diagram        .-noshowpdf-.
>>- -q--+-showpdf---+------------------------------------------><

Notes

This option has effect only when specified together with the -qpdf1 compiler option.

When specified with -qpdf1 and a minimum optimization level of -O, the compiler inserts additional profiling information into the compiled application to collect call and block counts for all procedures in the application. Running the compiled application will record the call and block counts to the file ._pdf .

After you run your application with training data, you can retrieve the contents of the ._pdf file with the showpdf utility. This utility is described in the -qpdf pages.

Example

The example assumes the following source for program file hello.c:

#include <stdio.h>

void HelloWorld()
{
 printf("Hello World");
}

main()
{
 HelloWorld();
}

Compile the source with:

xlc -qpdf1 -O -qshowpdf hello.c

Run the resulting program executable:

a.out

Run the showpdf utility to display the call and block counts for the executable:

showpdf

Something similar to the following will be returned by the showpdf utility:

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 )

Related information