Hi Jyothish,

Can you elaborate on what you're trying to do? How do you end up with a
thread context that has no process pointer? When does that thread context
get used?

Thanks,

Steve



On Fri, Sep 18, 2015 at 3:30 AM Jyothish Soman <[email protected]>
wrote:

> Just in case anyone faces this later, this made it work:
>
>  diff -r c56647a1bea9 src/cpu/base.cc
>  --- a/src/cpu/base.cc   Thu Sep 17 19:27:07 2015 +0100
>  +++ b/src/cpu/base.cc   Fri Sep 18 11:26:54 2015 +0100
>  @@ -452,8 +452,10 @@
>           else
>               tc->setContextId(system->registerThreadContext(tc));
>
>  -        if (!FullSystem)
>  -            tc->getProcessPtr()->assignThreadContext(tc->contextId());
>  +        if (!FullSystem){
>  +            if(tc->getProcessPtr()!=NULL)
>  +
> tc->getProcessPtr()->assignThreadContext(tc->contextId());
>  +        }
>       }
>   }
>
>  diff -r c56647a1bea9 src/cpu/o3/fetch_impl.hh
>  --- a/src/cpu/o3/fetch_impl.hh  Thu Sep 17 19:27:07 2015 +0100
>  +++ b/src/cpu/o3/fetch_impl.hh  Fri Sep 18 11:26:54 2015 +0100
>  @@ -1144,7 +1144,8 @@
>       // Start actual fetch
>       //////////////////////////////////////////
>       ThreadID tid = getFetchingThread(fetchPolicy);
>  -
>  +    if(cpu->getContext(tid)->getProcessPtr()==NULL)
>  +        return;
>       assert(!cpu->switchedOut());
>
>       if (tid == InvalidThreadID) {
>
>  diff -r c56647a1bea9 src/cpu/thread_state.cc
>  --- a/src/cpu/thread_state.cc   Thu Sep 17 19:27:07 2015 +0100
>  +++ b/src/cpu/thread_state.cc   Fri Sep 18 11:26:54 2015 +0100
>  @@ -118,6 +118,7 @@
>           virtProxy = new FSTranslatingPortProxy(tc);
>       } else {
>           assert(proxy == NULL);
>  +        if(process!=NULL)
>           proxy = new SETranslatingPortProxy(baseCpu->getDataPort(),
>                                              process,
>
> SETranslatingPortProxy::NextPage);
>
> On 18 September 2015 at 09:57, Jyothish Soman <[email protected]>
> wrote:
>
> > Hi,
> >
> > There is some code in o3 cpu, related to a dummy process for initialising
> > a lazy thread, but there is no support for it in any other part of the
> code
> > base. Recommend trimming it out maybe?
> > Apologies for double posting, as this falls midway between a user request
> > and a bug report.
> >
> > Best,
> > Jyothish
> >
> _______________________________________________
> gem5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/gem5-dev
>
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to