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
PAPI.EventSet
PAPI.EventSet
PAPI.EventSet
PAPI.accum_counters!
PAPI.available_native
PAPI.available_presets
PAPI.collect_events
PAPI.event_to_name
PAPI.measurement_groups
PAPI.name_to_event
PAPI.num_counters
PAPI.profile
PAPI.read_counters!
PAPI.reset_counters!
PAPI.sample
PAPI.start_counters
PAPI.stop_counters
PAPI.stop_counters!
PAPI.try_add_event
Public Interface
PAPI.accum_counters!
— Methodaccum_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)
PAPI.available_native
— Methodavailable_native()
Returns a list of the native events available on the current platform.
PAPI.available_presets
— Methodavailable_presets()
Returns a list of the presets available on the current platform.
PAPI.collect_events
— Methodcollect_events(evtsets::Vector{EventSet})
Collect the event in the groups in order
PAPI.event_to_name
— Methodevent_to_name(evt::Event)
Converts an event into a name.
PAPI.measurement_groups
— Methodmeasurement_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.
PAPI.name_to_event
— Methodname_to_event(evt::Event)
Converts event name into an event
PAPI.num_counters
— MethodGet 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.
PAPI.profile
— Methodprofile(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
PAPI.read_counters!
— Methodread_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)
PAPI.reset_counters!
— Methodreset_counters!(evtset::EventSet)
Reset counters and leaves them running after the call.
PAPI.sample
— Methodsample(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
PAPI.start_counters
— Methodstart_counters(events)
Start counting hardware events. This function cannot be called if the counters have already been started.
PAPI.stop_counters!
— Methodstop_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)
PAPI.stop_counters
— Methodstop_counters(evtset::EventSet)
Stop counters and returns counts The counters must have been started by a previous call to start_counters
PAPI.try_add_event
— Methodtry_add_event(evtset::EventSet, evt::Event)
Tries to add the event evt
to the set. Returns success or not.
PAPI.EventSet
— TypeEventSet
A set of PAPI native or preset events
PAPI.EventSet
— MethodEventSet(evts::AbstractVector{Events})
Create an eventset containing the specified events. The events can be either native or preset PAPI events.
PAPI.EventSet
— MethodEventSet(evts::Events...)
Create an eventset containing the specified events. The events can be either native or preset PAPI events.