guanaqo 1.0.0-alpha.27
Utilities for scientific software
Loading...
Searching...
No Matches
Performance Counters

Detailed Description

CPU performance counters (PCM) integration and scoped collectors.

Collaboration diagram for Performance Counters:

Files

file  counters.hpp
 Performance counter snapshots and scoped collectors.

Classes

struct  guanaqo::pcm::ThreadPerfCounters
struct  guanaqo::pcm::ScopedCounters< F >
 Pins the thread to the current CPU and records a snapshot of performance events. More...

Functions

std::unique_ptr< detail::ScopedCountersguanaqo::pcm::start_counters ()
 May return null if PCM is not available.
void guanaqo::pcm::disable_counters ()
 Disables performance counters globally. Blocks until all active counters have stopped.
void guanaqo::pcm::enable_counters ()
 Enables performance counters globally.
template<class F>
 guanaqo::pcm::ScopedCounters (F &&) -> ScopedCounters< F >
template<class F>
 guanaqo::pcm::ScopedCounters (F &) -> ScopedCounters< F & >

Class Documentation

◆ guanaqo::pcm::ThreadPerfCounters

struct guanaqo::pcm::ThreadPerfCounters
Collaboration diagram for guanaqo::pcm::ThreadPerfCounters:
Class Members
uint64_t instructions = 0
uint64_t cycles = 0
uint64_t ref_cycles = 0
uint64_t l2_misses = 0
uint64_t l2_hits = 0
uint64_t l3_misses = 0
uint64_t branch_misses = 0
uint64_t all_slots = 0
uint64_t frontend_bound_slots = 0
uint64_t backend_bound_slots = 0
uint64_t bad_speculation_slots = 0
uint64_t retiring_slots = 0
uint64_t mem_bound_slots = 0
uint64_t fetch_lat_slots = 0

Function Documentation

◆ start_counters()

std::unique_ptr< detail::ScopedCounters > guanaqo::pcm::start_counters ( )

#include <guanaqo/pcm/counters.hpp>

May return null if PCM is not available.

Definition at line 398 of file counters.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ disable_counters()

void guanaqo::pcm::disable_counters ( )

#include <guanaqo/pcm/counters.hpp>

Disables performance counters globally. Blocks until all active counters have stopped.

Definition at line 389 of file counters.cpp.

Here is the call graph for this function:

◆ enable_counters()

void guanaqo::pcm::enable_counters ( )

#include <guanaqo/pcm/counters.hpp>

Enables performance counters globally.

Definition at line 394 of file counters.cpp.

Here is the call graph for this function:

◆ ScopedCounters() [1/2]

template<class F>
guanaqo::pcm::ScopedCounters ( F && ) -> ScopedCounters< F >

◆ ScopedCounters() [2/2]

template<class F>
guanaqo::pcm::ScopedCounters ( F & ) -> ScopedCounters< F & >