|
Packit Service |
a1973e |
% PAPI Performance API.
|
|
Packit Service |
a1973e |
% PAPI provides access to one of 8 Hardware Performance Monitoring functions.
|
|
Packit Service |
a1973e |
%
|
|
Packit Service |
a1973e |
% ctrs = PAPI('num') - Return the number of hardware counters.
|
|
Packit Service |
a1973e |
% PAPI('start', 'event', ...) -
|
|
Packit Service |
a1973e |
% Begin counting the specified events.
|
|
Packit Service |
a1973e |
% [val, ...] = PAPI('stop') - Stop counting and return the current values.
|
|
Packit Service |
a1973e |
% [val, ...] = PAPI('read') - Read the current values of the active counters.
|
|
Packit Service |
a1973e |
% [val, ...] = PAPI('accum') - Add the current values of the active counters
|
|
Packit Service |
a1973e |
% to the input values.
|
|
Packit Service |
a1973e |
% PAPI('ipc') - Begin counting instructions.
|
|
Packit Service |
a1973e |
% ins = PAPI('ipc') - Return the number of instructions executed
|
|
Packit Service |
a1973e |
% since the first call.
|
|
Packit Service |
a1973e |
% [ins, ipc] = PAPI('ipc') - Return both the total number of instructions
|
|
Packit Service |
a1973e |
% executed since the first call, and the
|
|
Packit Service |
a1973e |
% incremental rate of instruction execution
|
|
Packit Service |
a1973e |
% since the last call.
|
|
Packit Service |
a1973e |
% PAPI('flips')
|
|
Packit Service |
a1973e |
% PAPI('flops') - Begin counting floating point
|
|
Packit Service |
a1973e |
% instructions or operations.
|
|
Packit Service |
a1973e |
% ins = PAPI('flips')
|
|
Packit Service |
a1973e |
% ops = PAPI('flops') - Return the number of floating point instruc-
|
|
Packit Service |
a1973e |
% tions or operations since the first call.
|
|
Packit Service |
a1973e |
% [ins, mflips] = PAPI('flips')
|
|
Packit Service |
a1973e |
% [ops, mflops] = PAPI('flops') -
|
|
Packit Service |
a1973e |
% Return both the number of floating point
|
|
Packit Service |
a1973e |
% instructions or operations since the first
|
|
Packit Service |
a1973e |
% call, and the incremental rate of floating
|
|
Packit Service |
a1973e |
% point execution since since the last call.
|
|
Packit Service |
a1973e |
%
|
|
Packit Service |
a1973e |
% DESCRIPTION
|
|
Packit Service |
a1973e |
% The PAPI function provides access to the PAPI Performance API.
|
|
Packit Service |
a1973e |
% PAPI takes advantage of the fact that most modern microprocessors
|
|
Packit Service |
a1973e |
% have built-in hardware support for counting a variety of basic operations
|
|
Packit Service |
a1973e |
% or events. PAPI uses these counters to track things like instructions
|
|
Packit Service |
a1973e |
% executed, cycles elapsed, floating point instructions performed and
|
|
Packit Service |
a1973e |
% a variety of other events.
|
|
Packit Service |
a1973e |
%
|
|
Packit Service |
a1973e |
% There are 8 subfunctions within the PAPI call, as described below:
|
|
Packit Service |
a1973e |
% 'num' - provides information on the number of hardware counters built
|
|
Packit Service |
a1973e |
% into this platform. The result of this call specifies how many
|
|
Packit Service |
a1973e |
% events can be counted at once.
|
|
Packit Service |
a1973e |
% 'start' - programs the counters with the named events and begins
|
|
Packit Service |
a1973e |
% counting. The names of the events can be found in the PAPI
|
|
Packit Service |
a1973e |
% documentation. If a named event cannot be found, or cannot
|
|
Packit Service |
a1973e |
% be mapped, an error message is displayed.
|
|
Packit Service |
a1973e |
% 'stop' - stops counting and returns the values of the counters in the
|
|
Packit Service |
a1973e |
% same order as events were specified in the start command.
|
|
Packit Service |
a1973e |
% 'stop' also can be used to reset the counters for the ipc
|
|
Packit Service |
a1973e |
% flips and flops subfunctions described below.
|
|
Packit Service |
a1973e |
% 'read' - return the values of the counters without stopping them.
|
|
Packit Service |
a1973e |
% 'accum' - adds the values of the counters to the input parameters and
|
|
Packit Service |
a1973e |
% returns them in the output parameters. Counting is not stopped.
|
|
Packit Service |
a1973e |
% 'ipc' - returns the total instructions executed since the first call
|
|
Packit Service |
a1973e |
% to this subfunction, and the rate of execution of instructions
|
|
Packit Service |
a1973e |
% (as instructions per cycle) since the last call.
|
|
Packit Service |
a1973e |
% 'flips' - returns the total floating point instructions executed since
|
|
Packit Service |
a1973e |
% the first call to this subfunction, and the rate of execution
|
|
Packit Service |
a1973e |
% of floating point instructions (as mega-floating point
|
|
Packit Service |
a1973e |
% instructions per second, or mflips) since the last call.
|
|
Packit Service |
a1973e |
% A floating point instruction is defined as whatever this cpu
|
|
Packit Service |
a1973e |
% naturally counts as floating point instructions.
|
|
Packit Service |
a1973e |
% 'flops' - identical to 'flips', except it measures floating point
|
|
Packit Service |
a1973e |
% operations rather than instructions. In many cases these two
|
|
Packit Service |
a1973e |
% counts may be identical. In some cases 'flops' will be a
|
|
Packit Service |
a1973e |
% derived value that attempts to reproduce that which is
|
|
Packit Service |
a1973e |
% traditionally considered a floating point operation. For
|
|
Packit Service |
a1973e |
% example, a fused multiply-add would be counted as two
|
|
Packit Service |
a1973e |
% operations, even if it was only a single instruction.
|
|
Packit Service |
a1973e |
%
|
|
Packit Service |
a1973e |
% In typical usage, the first five subfunctions: 'num', 'start', 'stop',
|
|
Packit Service |
a1973e |
% 'read', and 'accum' are used together. 'num establishes the maximum number
|
|
Packit Service |
a1973e |
% of events that can be supplied to 'start'. After a 'start' is issued,
|
|
Packit Service |
a1973e |
% 'read' and 'accum' can be intermixed until a 'stop' is issued.
|
|
Packit Service |
a1973e |
%
|
|
Packit Service |
a1973e |
% The three rate calls, 'ipc', 'flips', and 'flops' are intended to be used
|
|
Packit Service |
a1973e |
% independently. They cannot be mixed, because they use the same counter
|
|
Packit Service |
a1973e |
% resources. They can be used serially if they are separated by a 'stop'
|
|
Packit Service |
a1973e |
% call, which can also be used to reset the counters.
|
|
Packit Service |
a1973e |
%
|
|
Packit Service |
a1973e |
% Copyright 2001 - 2004 The Innovative Computing Laboratory,
|
|
Packit Service |
a1973e |
% University of Tennessee.
|
|
Packit Service |
a1973e |
% $Revision$ $Date$
|
|
Packit Service |
a1973e |
|