MARK introduces a mark called name that is treated the same as a function entry point. Execution of the mark adds to a counter for that mark, and program-counter
time spent is accounted to the immediately preceding mark or to the function if there are no preceding marks within the active function.
name may be any combination of letters, numbers, or underscores. Each name in a single compilation must be unique, but may be the same as any
ordinary program symbol.
For marks to be effective, the symbol MARK must be defined before the header prof.h is included, either by a preprocessor directive as in the synopsis, or by
a command line argument:
cc -p -DMARK work.c
If MARK is not defined, the MARK(name) statements may be left in the source files containing them and are ignored. prof -g must be used to get information on all labels.
|