gem5 v24.0.0.0
|
A dueler is an entry that may or may not be accounted for sampling. More...
#include <dueling.hh>
Public Member Functions | |
Dueler () | |
By default initializes entries as followers. | |
virtual | ~Dueler ()=default |
void | setSample (uint64_t id, bool team) |
Make this entry a sampling entry for a specific Dueling instance. | |
bool | isSample (uint64_t id, bool &team) const |
Check if entry is a sample for the given instance. | |
Private Attributes | |
uint64_t | _isSample |
Whether this entry is a sample or a follower. | |
uint64_t | _team |
If entry is a sample, it belongs to one of two possible teams. | |
A dueler is an entry that may or may not be accounted for sampling.
Whenever an action triggers sampling, the dueling monitor will check if the dueler is a sample so that it can decide whether to perform the sampling or not.
Each sampling dueler belongs to a team, "True" or "False", for which it "duels". For example, if a sample belongs to team "True" and it is sampled, team "True" will score a point.
Definition at line 52 of file dueling.hh.
gem5::Dueler::Dueler | ( | ) |
By default initializes entries as followers.
Definition at line 39 of file dueling.cc.
|
virtualdefault |
bool gem5::Dueler::isSample | ( | uint64_t | id, |
bool & | team ) const |
Check if entry is a sample for the given instance.
If so, provide back its team.
id | The ID of the Dueling instance that called this function. |
team | Team to which this sampling entry belongs (only 2 possible). |
Definition at line 57 of file dueling.cc.
References _isSample, _team, and gem5::ArmISA::id.
Referenced by gem5::DuelingMonitor::isSample(), gem5::DuelingMonitor::sample(), and TEST().
void gem5::Dueler::setSample | ( | uint64_t | id, |
bool | team ) |
Make this entry a sampling entry for a specific Dueling instance.
id | The ID of the Dueling instance that called this function. |
team | Team to which this sampling entry belongs (only 2 possible). |
Definition at line 45 of file dueling.cc.
References _isSample, _team, gem5::ArmISA::id, panic_if, and gem5::popCount().
Referenced by gem5::DuelingMonitor::initEntry(), and TEST().
|
private |
Whether this entry is a sample or a follower.
Each bit corresponds to a different ueling monitor instance. If more than 64 instances are needed this needs to be changed to an array containing the ids being sampled.
Definition at line 61 of file dueling.hh.
Referenced by isSample(), and setSample().
|
private |
If entry is a sample, it belongs to one of two possible teams.
Each bit corresponds to a different dueling monitor instance.
Definition at line 67 of file dueling.hh.
Referenced by isSample(), and setSample().