summaryrefslogtreecommitdiff
path: root/src/arch/arm/pmu.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/pmu.hh')
-rw-r--r--src/arch/arm/pmu.hh13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/arch/arm/pmu.hh b/src/arch/arm/pmu.hh
index 989ad76c6..94f8c2397 100644
--- a/src/arch/arm/pmu.hh
+++ b/src/arch/arm/pmu.hh
@@ -323,7 +323,7 @@ class PMU : public SimObject, public ArmISA::BaseISADevice {
/** State of a counter within the PMU. */
struct CounterState {
CounterState()
- : eventId(0), value(0), enabled(false),
+ : eventId(0), filter(0), value(0), enabled(false),
overflow64(false) {
listeners.reserve(4);
@@ -344,6 +344,9 @@ class PMU : public SimObject, public ArmISA::BaseISADevice {
/** Counter event ID */
EventTypeId eventId;
+ /** Filtering settings (evtCount is unused) */
+ PMEVTYPER_t filter;
+
/** Current value of the counter */
uint64_t value;
@@ -422,6 +425,14 @@ class PMU : public SimObject, public ArmISA::BaseISADevice {
void updateCounter(CounterId id, CounterState &ctr);
/**
+ * Check if a counter's settings allow it to be counted.
+ *
+ * @param ctr Counter state instance representing this counter.
+ * @return false if the counter is active, true otherwise.
+ */
+ bool isFiltered(const CounterState &ctr) const;
+
+ /**
* Call updateCounter() for each counter in the PMU if the
* counter's state has changed..
*