From: Korey Sewell Date: Mon, 20 Jun 2011 01:43:33 +0000 (-0400) Subject: simple-thread: give a name() function for debugging w/the SimpleThread object X-Git-Tag: stable_2012_02_02~268 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b2e5152e164d3d470e2887c9c4d0b17b0c3946cc;p=gem5.git simple-thread: give a name() function for debugging w/the SimpleThread object --- 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;