N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

   

gperf

Format
gperf [-c] [-r] [-s] [-t threshold] a.out

What This Tool Does
It analyzes profile data. Specifically, it converts the output data produced by the group of osProfile functions along with symbol table information from a.out (or your executable's name) into a printed report detailing the relative time spent by the program in various functions. This data is obtained using pc-sampling which interrupts the program at regular intervals to record the value of the program counter.

Tbe gperf tool can operate in a query mode (default), in which each execution sends a request to the program running on the development board for profile data. The profiled data is transferred back to the host and displayed by gperf. After displaying the data, gperf exits. gperf can also be run in a server mode (specify the -s option) in which it spins waiting for the program to execute the osProfileFlush function. gperf then displays the data and waits for the next osProfileFlush.

The gperf tool always displays the address of the function being displayed, the function name, and the percent of execution time used by the function.

Example gperf Output
-------------------------------------------------------------
Profile Report for osprof
Number of text symbols: 195
Sample period: 1000 microseconds
Number of profiled segments: 2
Text segment 0, start = 80200050, size = 000000d4
Text segment 1, start = 80200470, size = 000031cc
-------------------------------------------------------------


80202088  osProfileStop..............................    0.0616 %
80201720  osSetThreadPri.............................    0.1232 %
Overflow  ...........................................   99.8152 %
Command Line Options
  • -c Displays the raw counts for each text symbol. The -t option then uses the units of raw counts for the threshold.
  • -r Displays the time used by each text symbol in seconds.
  • -s Executes in server mode; that is, it waits for a flush from the application rather than initiating a flush from gperf and not exiting. Note that the application must cooperate by calling osProfileFlush.
  • -t threshold Defines a threshold value at which to print results. Default value is 1.0. If the -c option is used, the threshold is in units of raw counts, otherwise the units are a percentage of execution time.
Bugs
If you execute gperf without the -s option and the application calls the osProfileFlush function, the application will stop responding (hang).


Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.

Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated January 1998