cpu: Dispatch PCEvents to the CheckerCPU SimpleThread
Moving PCEvents scheduling from the system to the Thread [1] requires us to forward PCEvents to the CheckerCPU thread. We will otherwise encounter a divergence with the checker when trying to emulate a SkipFunction in the host (e.g. udelay on Arm). While the original thread will correctly emulate it and jump to the next instruction in the binary), the Checker's thread, with no scheduled PCEvent, will jump straight into the function. This is fixing realview64-o3-checker.py regression JIRA: https://gem5.atlassian.net/browse/GEM5-364 [1]: https://gem5-review.googlesource.com/c/public/gem5/+/22106 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Change-Id: I8543535eac3adc366e976b1c0999aafaeca6b141 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46625 Reviewed-by: Richard Cooper <richard.cooper@arm.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2012, 2016-2018, 2020 ARM Limited
|
||||
* Copyright (c) 2011-2012, 2016-2018, 2020-2021 Arm Limited
|
||||
* Copyright (c) 2013 Advanced Micro Devices, Inc.
|
||||
* All rights reserved
|
||||
*
|
||||
@@ -84,8 +84,23 @@ class CheckerThreadContext : public ThreadContext
|
||||
CheckerCPU *checkerCPU;
|
||||
|
||||
public:
|
||||
bool schedule(PCEvent *e) override { return actualTC->schedule(e); }
|
||||
bool remove(PCEvent *e) override { return actualTC->remove(e); }
|
||||
bool
|
||||
schedule(PCEvent *e) override
|
||||
{
|
||||
GEM5_VAR_USED bool check_ret = checkerTC->schedule(e);
|
||||
bool actual_ret = actualTC->schedule(e);
|
||||
assert(actual_ret == check_ret);
|
||||
return actual_ret;
|
||||
}
|
||||
|
||||
bool
|
||||
remove(PCEvent *e) override
|
||||
{
|
||||
GEM5_VAR_USED bool check_ret = checkerTC->remove(e);
|
||||
bool actual_ret = actualTC->remove(e);
|
||||
assert(actual_ret == check_ret);
|
||||
return actual_ret;
|
||||
}
|
||||
|
||||
void
|
||||
scheduleInstCountEvent(Event *event, Tick count) override
|
||||
|
||||
Reference in New Issue
Block a user