gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | List of all members
DumpStatsPCEvent Class Reference

#include <system.hh>

Inheritance diagram for DumpStatsPCEvent:
PCEvent DumpStatsPCEvent64

Public Member Functions

 DumpStatsPCEvent (PCEventScope *s, const std::string &desc, Addr addr)
 
virtual void process (ThreadContext *tc)
 This function is called whenever the the kernel function "__switch_to" is called to change running tasks. More...
 
- 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 ()
 

Protected Member Functions

virtual void getTaskDetails (ThreadContext *tc, uint32_t &pid, uint32_t &tgid, std::string &next_task_str, int32_t &mm)
 Extracts the information used by the DumpStatsPCEvent by reading the thread_info pointer passed to __switch_to() in 32 bit ARM Linux. More...
 

Additional Inherited Members

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

Detailed Description

Definition at line 127 of file system.hh.

Constructor & Destructor Documentation

◆ DumpStatsPCEvent()

DumpStatsPCEvent::DumpStatsPCEvent ( PCEventScope s,
const std::string &  desc,
Addr  addr 
)
inline

Definition at line 130 of file system.hh.

Member Function Documentation

◆ getTaskDetails()

void DumpStatsPCEvent::getTaskDetails ( ThreadContext tc,
uint32_t &  pid,
uint32_t &  tgid,
std::string &  next_task_str,
int32_t &  mm 
)
protectedvirtual

Extracts the information used by the DumpStatsPCEvent by reading the thread_info pointer passed to __switch_to() in 32 bit ARM Linux.

r0 = task_struct of the previously running process r1 = thread_info of the previously running process r2 = thread_info of the next process to run

Reimplemented in DumpStatsPCEvent64.

Definition at line 284 of file system.cc.

References Linux::ThreadInfo::curTaskMm(), Linux::ThreadInfo::curTaskName(), Linux::ThreadInfo::curTaskPID(), Linux::ThreadInfo::curTaskTGID(), ThreadContext::readIntReg(), and MipsISA::ti.

◆ process()

void DumpStatsPCEvent::process ( ThreadContext tc)
virtual

This function is called whenever the the kernel function "__switch_to" is called to change running tasks.

Implements PCEvent.

Definition at line 324 of file system.cc.

References ccprintf(), ThreadContext::cpuId(), curTick(), ThreadContext::getCpuPtr(), ThreadContext::getSystemPtr(), LinuxArmSystem::mapPid(), panic, Stats::schedStatEvent(), BaseCPU::setPid(), OutputStream::stream(), LinuxArmSystem::taskFile, BaseCPU::taskId(), and LinuxArmSystem::taskMap.


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

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