diff -r 3f0fd7b4f437 -r 8b710352c6fc src/cpu/base.hh --- a/src/cpu/base.hh Thu Mar 06 11:23:53 2014 -0800 +++ b/src/cpu/base.hh Thu Mar 06 11:23:54 2014 -0800 @@ -143,7 +143,7 @@ virtual MasterPort &getInstPort() = 0; /** Reads this CPU's ID. */ - int cpuId() { return _cpuId; } + int cpuId() const { return _cpuId; } /** Reads this CPU's unique data requestor ID */ MasterID dataMasterId() { return _dataMasterId; } diff -r 3f0fd7b4f437 -r 8b710352c6fc src/cpu/base_dyn_inst.hh --- a/src/cpu/base_dyn_inst.hh Thu Mar 06 11:23:53 2014 -0800 +++ b/src/cpu/base_dyn_inst.hh Thu Mar 06 11:23:54 2014 -0800 @@ -454,16 +454,16 @@ void dump(std::string &outstring); /** Read this CPU's ID. */ - int cpuId() { return cpu->cpuId(); } + int cpuId() const { return cpu->cpuId(); } /** Read this CPU's data requestor ID */ - MasterID masterId() { return cpu->dataMasterId(); } + MasterID masterId() const { return cpu->dataMasterId(); } /** Read this context's system-wide ID **/ - int contextId() { return thread->contextId(); } + int contextId() const { return thread->contextId(); } /** Returns the fault type. */ - Fault getFault() { return fault; } + Fault getFault() const { return fault; } /** Checks whether or not this instruction has had its branch target * calculated yet. For now it is not utilized and is hacked to be diff -r 3f0fd7b4f437 -r 8b710352c6fc src/cpu/checker/thread_context.hh --- a/src/cpu/checker/thread_context.hh Thu Mar 06 11:23:53 2014 -0800 +++ b/src/cpu/checker/thread_context.hh Thu Mar 06 11:23:54 2014 -0800 @@ -92,9 +92,9 @@ BaseCPU *getCpuPtr() { return actualTC->getCpuPtr(); } - int cpuId() { return actualTC->cpuId(); } + int cpuId() const { return actualTC->cpuId(); } - int contextId() { return actualTC->contextId(); } + int contextId() const { return actualTC->contextId(); } void setContextId(int id) { @@ -103,7 +103,7 @@ } /** Returns this thread's ID number. */ - int threadId() { return actualTC->threadId(); } + int threadId() const { return actualTC->threadId(); } void setThreadId(int id) { checkerTC->setThreadId(id); diff -r 3f0fd7b4f437 -r 8b710352c6fc src/cpu/inorder/inorder_dyn_inst.hh --- a/src/cpu/inorder/inorder_dyn_inst.hh Thu Mar 06 11:23:53 2014 -0800 +++ b/src/cpu/inorder/inorder_dyn_inst.hh Thu Mar 06 11:23:54 2014 -0800 @@ -357,10 +357,10 @@ Fault getFault() { return fault; } /** Read this CPU's ID. */ - int cpuId(); + int cpuId() const; /** Read this context's system-wide ID **/ - int contextId() { return thread->contextId(); } + int contextId() const { return thread->contextId(); } //////////////////////////////////////////////////////////// // diff -r 3f0fd7b4f437 -r 8b710352c6fc src/cpu/inorder/inorder_dyn_inst.cc --- a/src/cpu/inorder/inorder_dyn_inst.cc Thu Mar 06 11:23:53 2014 -0800 +++ b/src/cpu/inorder/inorder_dyn_inst.cc Thu Mar 06 11:23:54 2014 -0800 @@ -91,7 +91,7 @@ int InOrderDynInst::instcount = 0; int -InOrderDynInst::cpuId() +InOrderDynInst::cpuId() const { return cpu->cpuId(); } diff -r 3f0fd7b4f437 -r 8b710352c6fc src/cpu/inorder/thread_context.hh --- a/src/cpu/inorder/thread_context.hh Thu Mar 06 11:23:53 2014 -0800 +++ b/src/cpu/inorder/thread_context.hh Thu Mar 06 11:23:54 2014 -0800 @@ -111,14 +111,14 @@ std::string getCpuName() { return cpu->name(); } /** Reads this CPU's ID. */ - int cpuId() { return cpu->cpuId(); } + int cpuId() const { return cpu->cpuId(); } - int contextId() { return thread->contextId(); } + int contextId() const { return thread->contextId(); } void setContextId(int id) { thread->setContextId(id); } /** Returns this thread's ID number. */ - int threadId() { return thread->threadId(); } + int threadId() const { return thread->threadId(); } void setThreadId(int id) { return thread->setThreadId(id); } uint64_t readMicroPC() diff -r 3f0fd7b4f437 -r 8b710352c6fc src/cpu/o3/thread_context.hh --- a/src/cpu/o3/thread_context.hh Thu Mar 06 11:23:53 2014 -0800 +++ b/src/cpu/o3/thread_context.hh Thu Mar 06 11:23:54 2014 -0800 @@ -96,14 +96,14 @@ virtual BaseCPU *getCpuPtr() { return cpu; } /** Reads this CPU's ID. */ - virtual int cpuId() { return cpu->cpuId(); } + virtual int cpuId() const { return cpu->cpuId(); } - virtual int contextId() { return thread->contextId(); } + virtual int contextId() const { return thread->contextId(); } virtual void setContextId(int id) { thread->setContextId(id); } /** Returns this thread's ID number. */ - virtual int threadId() { return thread->threadId(); } + virtual int threadId() const { return thread->threadId(); } virtual void setThreadId(int id) { return thread->setThreadId(id); } /** Returns a pointer to the system. */ diff -r 3f0fd7b4f437 -r 8b710352c6fc src/cpu/ozone/cpu.hh --- a/src/cpu/ozone/cpu.hh Thu Mar 06 11:23:53 2014 -0800 +++ b/src/cpu/ozone/cpu.hh Thu Mar 06 11:23:54 2014 -0800 @@ -149,7 +149,7 @@ void profileClear(); void profileSample(); - int threadId(); + int threadId() const; void copyArchRegs(ThreadContext *tc); diff -r 3f0fd7b4f437 -r 8b710352c6fc src/cpu/ozone/cpu_impl.hh --- a/src/cpu/ozone/cpu_impl.hh Thu Mar 06 11:23:53 2014 -0800 +++ b/src/cpu/ozone/cpu_impl.hh Thu Mar 06 11:23:54 2014 -0800 @@ -704,7 +704,7 @@ template int -OzoneCPU::OzoneTC::threadId() +OzoneCPU::OzoneTC::threadId() const { return thread->threadId(); } diff -r 3f0fd7b4f437 -r 8b710352c6fc src/cpu/thread_context.hh --- a/src/cpu/thread_context.hh Thu Mar 06 11:23:53 2014 -0800 +++ b/src/cpu/thread_context.hh Thu Mar 06 11:23:54 2014 -0800 @@ -121,13 +121,13 @@ virtual BaseCPU *getCpuPtr() = 0; - virtual int cpuId() = 0; + virtual int cpuId() const = 0; - virtual int threadId() = 0; + virtual int threadId() const = 0; virtual void setThreadId(int id) = 0; - virtual int contextId() = 0; + virtual int contextId() const = 0; virtual void setContextId(int id) = 0; @@ -321,13 +321,13 @@ BaseCPU *getCpuPtr() { return actualTC->getCpuPtr(); } - int cpuId() { return actualTC->cpuId(); } + int cpuId() const { return actualTC->cpuId(); } - int threadId() { return actualTC->threadId(); } + int threadId() const { return actualTC->threadId(); } - void setThreadId(int id) { return actualTC->setThreadId(id); } + void setThreadId(int id) { actualTC->setThreadId(id); } - int contextId() { return actualTC->contextId(); } + int contextId() const { return actualTC->contextId(); } void setContextId(int id) { actualTC->setContextId(id); } diff -r 3f0fd7b4f437 -r 8b710352c6fc src/cpu/thread_state.hh --- a/src/cpu/thread_state.hh Thu Mar 06 11:23:53 2014 -0800 +++ b/src/cpu/thread_state.hh Thu Mar 06 11:23:54 2014 -0800 @@ -67,19 +67,19 @@ void unserialize(Checkpoint *cp, const std::string §ion); - int cpuId() { return baseCpu->cpuId(); } + int cpuId() const { return baseCpu->cpuId(); } - int contextId() { return _contextId; } + int contextId() const { return _contextId; } void setContextId(int id) { _contextId = id; } void setThreadId(ThreadID id) { _threadId = id; } - ThreadID threadId() { return _threadId; } + ThreadID threadId() const { return _threadId; } - Tick readLastActivate() { return lastActivate; } + Tick readLastActivate() const { return lastActivate; } - Tick readLastSuspend() { return lastSuspend; } + Tick readLastSuspend() const { return lastSuspend; } /** * Initialise the physical and virtual port proxies and tie them to