If I remember correctly, in GEM5 (or at least in M5 when I was studying the
source code), thread id refers to the hardware thread ID in a SMT processor.
So if the simulated system only has single-threaded cores, the threadID you
got will be always 0. This variable has nothing to do with the software
threading in multi-threaded applications. But I could be wrong since it has
been quite a while I didn't look at the source code.

On Fri, Aug 5, 2011 at 4:38 PM, Ali Saidi <[email protected]> wrote:

> Depending on which architecture your running some of them store  os
> thread/pid/asid information in some registers. However, for something like
> parsec, I doubt the threads are really moving so contextId (which is the
> core number the thread is running on) is probably sufficient.
>
> Aii
>
>
> On Aug 5, 2011, at 2:22 PM, [email protected] wrote:
>
> > Then, I guess it is the business of the guest OS rather than GEM5.
> >
> > On , biswabandan panda <[email protected]> wrote:
> > > hey, i want the thread id not this context id which tells about core
> ids , i want to print the thread ids inside a core . for example 2 core
> systems with blackscholes_4threads will have context ids as 0 and 1 ,
> similarly i want info about ids of the software threads
> > >
> > >
> > > On Sat, Aug 6, 2011 at 12:25 AM, [email protected]> wrote:
> > >
> > > try something like this at the desired places: "id =
> pkt->req->hasContextId() ? pkt->req->contextId() : -1;"
> > >
> > > Thanks,
> > > Leonard
> > >
> > >
> > >
> > > On , biswabandan panda [email protected]> wrote:
> > >
> > > > i am using the old one only, but my question is how to print the
> thread id ? i tried the same with pkt-> req->threadId , but it shows 0 only
> for all the accesses. any idea how to get the threadid?
> > > >
> > > >
> > >
> > > > On Fri, Aug 5, 2011 at 8:09 PM, Sage [email protected]> wrote:
> > > >
> > > > Hi Biswabandan,
> > > >
> > > > I am wondering what kind of cache modules you are using, classic or
> ruby? If you are working on the classic one, you will need to get the tid in
> src/mem/cache/tags/cache_impl.hh, or pass the tid information to "tag" class
> functions from the same file.
> > >
> > > >
> > > >
> > > >
> > > > Thanks,
> > > > Leonard
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Fri, Aug 5, 2011 at 5:39 AM, biswabandan panda
> [email protected]> wrote:
> > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Hi all,
> > > >          i know this topic was there in the mailing list but none of
> them works. Has anyone tried it or does anyone know how to get the thread id
> inside the cache modules.
> > >
> > > > --
> > > >
> > > > thanks&regards
> > > >
> > > >
> > > >
> > >
> > > > BISWABANDAN PANDAM.S.(RESEARCH SCHOLAR)
> > > >
> > > > RISE LAB
> > > > IIT MADRAS
> > > >
> > > > http://www.cse.iitm.ac.in/~biswa/
> > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > >
> > > > gem5-users mailing list
> > > >
> > > > [email protected]
> > >
> > > >
> > > > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
> > > >
> > > >
> > > >
> > > > --
> > > > Give our ability to our work, but our genius to our life!
> > >
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > >
> > > > gem5-users mailing list
> > > >
> > > > [email protected]
> > >
> > > >
> > > > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > thanks&regards
> > >
> > > >
> > >
> > > > BISWABANDAN PANDAM.S.(RESEARCH SCHOLAR)RISE LAB
> > >
> > > > IIT MADRAS
> > > >
> > > > http://www.cse.iitm.ac.in/~biswa/
> > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > _______________________________________________
> > >
> > > gem5-users mailing list
> > >
> > > [email protected]
> > >
> > > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
> > >
> > >
> > >
> > > --
> > >
> > > thanks&regards
> > >
> > > BISWABANDAN PANDAM.S.(RESEARCH SCHOLAR)RISE LAB
> > > IIT MADRAS
> > >
> > > http://www.cse.iitm.ac.in/~biswa/
> > >
> > >
> > >
> > >_______________________________________________
> > gem5-users mailing list
> > [email protected]
> > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to