Public Documentation

Documentation for PAPI.jl's public interface.

See the Internals section of the manual for internal package docs covering all submodules.

Contents

Index

Public Interface

PAPI.accum_counters!Method
accum_counters!(evtset::EventSet, values::Vector{Counts})

Accumulate and reset counters. accum_counters! accumulates the event counters into values. The counters are reset and left running after the call.

The user must provide a vector of the correct size (equal to the number of events)

source
PAPI.measurement_groupsMethod
measurement_groups(events::Vector{Event})

Split the list of events into subsets that can be counted at the same time. A greedy algorithm is used, so the subsets might not be optimal. The subsets computed depends on the order of the events.

source
PAPI.num_countersMethod

Get the number of hardware counters available on the system

PAPI.num_counters() initializes the PAPI library if necessary.

PAPI_num_counters()` returns the number of hardware counters available on the system.

source
PAPI.profileMethod
profile(f::Function, events::Vector{Event}; gcfirst::Bool=true, warmup::Int64=0)

Execute the function f once while counting specific events.

Arguments:

-`f`: the function to profile
-`events`: the events to count
-`gcfirst`: run the gc several times before the execution to reduce gc noise
-`warmup`: number of times to run the function prior to counting

Return values:

EventValues containing the events, counts and runtime collected

source
PAPI.read_counters!Method
read_counters!(evtset::EventSet, values::Vector{Counts})

Read and reset counters. read_counters! copies the event counters into values. The counters are reset and left running after the call.

The user must provide a vector of the correct size (equal to the number of events)

source
PAPI.sampleMethod
sample(f::Function, events::Vector{Event}; max_secs::Float64=5, max_epochs::Int64=1000, gcsample::Bool=false, warmup::Int64=1)

Execute the function f several times, each time counting specific events. Sampling continues until either the maximum number of samples max_epochs are collected or the runtime budget max_secs is exceeded.

Arguments:

-`f`: the function to profile
-`events`: the events to count
-`max_secs`: maximum number of seconds to sample for
-`gcsample`: run the gc several times before the execution to reduce gc noise
-`warmup`: number of times to run the function prior to counting

Return values:

EventStats containing the events, counts and runtime collected

source
PAPI.start_countersMethod
start_counters(events)

Start counting hardware events. This function cannot be called if the counters have already been started.

source
PAPI.stop_counters!Method
stop_counters!(evtset::EventSet, values::Vector{Counts})

Stop counters and return current counts. The counters must have been started by a previous call to start_counters

The user must provide a vector of the correct size (equal to the number of events)

source
PAPI.stop_countersMethod
stop_counters(evtset::EventSet)

Stop counters and returns counts The counters must have been started by a previous call to start_counters

source
PAPI.try_add_eventMethod
try_add_event(evtset::EventSet, evt::Event)

Tries to add the event evt to the set. Returns success or not.

source
PAPI.EventSetMethod
EventSet(evts::AbstractVector{Events})

Create an eventset containing the specified events. The events can be either native or preset PAPI events.

source
PAPI.EventSetMethod
EventSet(evts::Events...)

Create an eventset containing the specified events. The events can be either native or preset PAPI events.

source