diff options
author | Korey Sewell <ksewell@umich.edu> | 2011-06-19 21:43:33 -0400 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2011-06-19 21:43:33 -0400 |
commit | b2e5152e164d3d470e2887c9c4d0b17b0c3946cc (patch) | |
tree | 813d4e53a0c2acdf24298fc06db2989de0c16f9e /src | |
parent | 76c60c5f9309af239f7fbe65e760e65f6c84bbe5 (diff) | |
download | gem5-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.hh | 5 |
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; |