This uses the step counter the iris API provides.
Change-Id: Ic916888fa256d0aa65042d3e6695d9bf4ba32c86
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22111
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
client.unregisterEventCallback("ec_IRIS_INSTANCE_REGISTRY_CHANGED");
}
+Tick
+ThreadContext::getCurrentInstCount()
+{
+ uint64_t count;
+ auto ret = call().step_getStepCounterValue(_instId, count, "instruction");
+ panic_if(ret != iris::E_ok, "Failed to get instruction count.");
+ return count;
+}
+
ThreadContext::Status
ThreadContext::status() const
{
void serviceInstCountEvents(Tick count) override {}
void scheduleInstCountEvent(Event *event, Tick count) override {}
void descheduleInstCountEvent(Event *event) override {}
- Tick getCurrentInstCount() override { return 0; }
+ Tick getCurrentInstCount() override;
virtual Counter
totalInsts()