gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
Linux::UDelayEvent Class Reference

A class to skip udelay() and related calls in the kernel. More...

#include <events.hh>

Inheritance diagram for Linux::UDelayEvent:
SkipFuncEvent PCEvent

Public Member Functions

 UDelayEvent (PCEventScope *s, const std::string &desc, Addr addr, uint64_t mult, uint64_t div)
 
virtual void process (ThreadContext *xc)
 
- Public Member Functions inherited from SkipFuncEvent
 SkipFuncEvent (PCEventScope *s, const std::string &desc, Addr addr)
 
- Public Member Functions inherited from PCEvent
 PCEvent (PCEventScope *q, const std::string &desc, Addr pc)
 
virtual ~PCEvent ()
 
virtual const std::string name () const
 
std::string descr () const
 
Addr pc () const
 
bool remove ()
 

Private Attributes

uint64_t argDivToNs
 value to divide arg by to create ns. More...
 
uint64_t argMultToNs
 value to multiple arg by to create ns. More...
 

Additional Inherited Members

- Protected Attributes inherited from PCEvent
std::string description
 
PCEventScopescope
 
Addr evpc
 

Detailed Description

A class to skip udelay() and related calls in the kernel.

This class has two additional parameters that take the argument to udelay and manipulated it to come up with ns and eventually ticks to quiesce for. See descriptions of argDivToNs and argMultToNs below.

Definition at line 104 of file events.hh.

Constructor & Destructor Documentation

◆ UDelayEvent()

Linux::UDelayEvent::UDelayEvent ( PCEventScope s,
const std::string &  desc,
Addr  addr,
uint64_t  mult,
uint64_t  div 
)
inline

Definition at line 119 of file events.hh.

References Linux::DebugPrintkEvent::process().

Member Function Documentation

◆ process()

void Linux::UDelayEvent::process ( ThreadContext xc)
virtual

Reimplemented from SkipFuncEvent.

Definition at line 77 of file events.cc.

References AlphaISA::getArgument(), SkipFuncEvent::process(), and PseudoInst::quiesceNs().

Member Data Documentation

◆ argDivToNs

uint64_t Linux::UDelayEvent::argDivToNs
private

value to divide arg by to create ns.

This is present beacues the linux kernel code sometime precomputes the first multiply that is done in udelay() if the parameter is a constant. We need to undo it so here is how.

Definition at line 111 of file events.hh.

◆ argMultToNs

uint64_t Linux::UDelayEvent::argMultToNs
private

value to multiple arg by to create ns.

Nominally, this is 1000 to convert us to ns, but since linux can do some preprocessing of constant values something else might be required.

Definition at line 116 of file events.hh.


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

Generated on Fri Feb 28 2020 16:27:21 for gem5 by doxygen 1.8.13