The Pedigree Project 0.1
Classes | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
PerCpuTimeAccounting Class Reference
+ Collaboration diagram for PerCpuTimeAccounting:

Classes

struct  Slot
 

Public Member Functions

 PerCpuTimeAccounting (size_t count)
 
ALWAYS_INLINE bool add (CpuTimeMode mode, Time::Timestamp elapsed, size_t cpu)
 
Time::Timestamp total (CpuTimeMode mode) const
 

Private Member Functions

ALWAYS_INLINE Slotslot (size_t cpu) const
 
 PerCpuTimeAccounting (const PerCpuTimeAccounting &)=delete
 
PerCpuTimeAccountingoperator= (const PerCpuTimeAccounting &)=delete
 

Private Attributes

uint8_t * m_Storage
 
uint8_t * m_Slots
 
size_t m_Count
 

Static Private Attributes

static constexpr size_t SlotSize = 64
 

Detailed Description

Definition at line 13 of file PerCpuTimeAccounting.h.

Constructor & Destructor Documentation

◆ PerCpuTimeAccounting()

PerCpuTimeAccounting::PerCpuTimeAccounting ( size_t  count)
inlineexplicit

Definition at line 15 of file PerCpuTimeAccounting.h.

◆ ~PerCpuTimeAccounting()

PerCpuTimeAccounting::~PerCpuTimeAccounting ( )
inline

Definition at line 38 of file PerCpuTimeAccounting.h.

Member Function Documentation

◆ add()

ALWAYS_INLINE bool PerCpuTimeAccounting::add ( CpuTimeMode  mode,
Time::Timestamp  elapsed,
size_t  cpu 
)
inline

Kernel callers keep IRQs masked and supply their current dense CPU index.

Definition at line 43 of file PerCpuTimeAccounting.h.

◆ slot()

ALWAYS_INLINE Slot * PerCpuTimeAccounting::slot ( size_t  cpu) const
inlineprivate

Definition at line 79 of file PerCpuTimeAccounting.h.

◆ total()

Time::Timestamp PerCpuTimeAccounting::total ( CpuTimeMode  mode) const
inline

Definition at line 59 of file PerCpuTimeAccounting.h.

Member Data Documentation

◆ m_Count

size_t PerCpuTimeAccounting::m_Count
private

Definition at line 85 of file PerCpuTimeAccounting.h.

◆ m_Slots

uint8_t* PerCpuTimeAccounting::m_Slots
private

Definition at line 84 of file PerCpuTimeAccounting.h.

◆ m_Storage

uint8_t* PerCpuTimeAccounting::m_Storage
private

Definition at line 83 of file PerCpuTimeAccounting.h.

◆ SlotSize

constexpr size_t PerCpuTimeAccounting::SlotSize = 64
staticconstexprprivate

Definition at line 70 of file PerCpuTimeAccounting.h.


The documentation for this class was generated from the following file: