summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:33 -0400
committerKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:33 -0400
commitb2e5152e164d3d470e2887c9c4d0b17b0c3946cc (patch)
tree813d4e53a0c2acdf24298fc06db2989de0c16f9e /src
parent76c60c5f9309af239f7fbe65e760e65f6c84bbe5 (diff)
downloadgem5-b2e5152e164d3d470e2887c9c4d0b17b0c3946cc.tar.xz
simple-thread: give a name() function for debugging w/the SimpleThread object
Diffstat (limited to 'src')
-rw-r--r--src/cpu/simple_thread.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index dcf0663e2..a74616a0d 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -114,6 +114,11 @@ class SimpleThread : public ThreadState
bool predicate;
public:
+ std::string name() const
+ {
+ return csprintf("%s.[tid:%i]", cpu->name(), tc->threadId());
+ }
+
// pointer to CPU associated with this SimpleThread
BaseCPU *cpu;