gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
FreeBSD::UDelayEvent Class Reference

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

#include <events.hh>

Inheritance diagram for FreeBSD::UDelayEvent:
SkipFuncEvent PCEvent

Public Member Functions

 UDelayEvent (PCEventQueue *q, const std::string &desc, Addr addr, uint64_t mult, uint64_t div)
 
virtual void process (ThreadContext *xc)
 
- Public Member Functions inherited from SkipFuncEvent
 SkipFuncEvent (PCEventQueue *q, const std::string &desc, Addr addr)
 
- Public Member Functions inherited from PCEvent
 PCEvent (PCEventQueue *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
 
PCEventQueuequeue
 
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 45 of file events.hh.

Constructor & Destructor Documentation

FreeBSD::UDelayEvent::UDelayEvent ( PCEventQueue q,
const std::string &  desc,
Addr  addr,
uint64_t  mult,
uint64_t  div 
)
inline

Definition at line 60 of file events.hh.

Member Function Documentation

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

Reimplemented from SkipFuncEvent.

Definition at line 49 of file events.cc.

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

Member Data Documentation

uint64_t FreeBSD::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 52 of file events.hh.

Referenced by process().

uint64_t FreeBSD::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 57 of file events.hh.

Referenced by process().


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

Generated on Fri Jun 9 2017 13:04:30 for gem5 by doxygen 1.8.6