fastmodel: Implement getCurrentInstCount.
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>
This commit is contained in:
@@ -163,6 +163,15 @@ ThreadContext::~ThreadContext()
|
||||
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
|
||||
{
|
||||
|
||||
@@ -100,7 +100,7 @@ class ThreadContext : public ::ThreadContext
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user