From f948f9fca987b25ef0716e87fdc4e874fb607c14 Mon Sep 17 00:00:00 2001 From: Geoffrey Blake Date: Tue, 5 Apr 2016 05:29:02 -0500 Subject: cpu: Query CPU for inst executed from Python This patch adds the ability for the simulator to query the number of instructions a CPU has executed so far per hw-thread. This can be used to enable more flexible periodic events such as taking checkpoints starting 1s into simulation and X instructions thereafter. --- src/cpu/BaseCPU.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src/cpu/BaseCPU.py') diff --git a/src/cpu/BaseCPU.py b/src/cpu/BaseCPU.py index a54a63b46..4d114cbdc 100644 --- a/src/cpu/BaseCPU.py +++ b/src/cpu/BaseCPU.py @@ -101,6 +101,7 @@ class BaseCPU(MemObject): Counter totalInsts(); void scheduleInstStop(ThreadID tid, Counter insts, const char *cause); void scheduleLoadStop(ThreadID tid, Counter loads, const char *cause); + uint64_t getCurrentInstCount(ThreadID tid); ''') @classmethod -- cgit v1.2.3