This happens in building the simulator.

In file /mem/cache/coherence/coherence_protocol.cc,

bool
CoherenceProtocol::invalidateTrans(BaseCache *cache, MemReqPtr &req,
                                   CacheBlk *blk, MSHR *mshr,
                                   CacheBlk::State & new_state)
{
    new_state = (blk->status & ~stateMask) | Invalid;
    return false;
}

I was trying to insert
    DPRINTF(Cache, "invalidate");
before return false statement

So that I am notified of cache invalidation.

When I try to build that, I got the following error:g++ -o ALPHA_SE/mem/cache/coherence/coherence_protocol.o -c -pipe -fno-strict-aliasing -Wall -Wno-sign-compare -Wundef -g -O5 -DSS_COMPATIBLE_FP -Iext/dnet -IALPHA_SE -Im5 m5/mem/cache/coherence/coherence_protocol.cc
m5/mem/cache/coherence/coherence_protocol.cc: In static member function `static bool CoherenceProtocol::invalidateTrans(BaseCache*, MemReqPtr&, CacheBlk*, MSHR*, unsigned int&)':
m5/mem/cache/coherence/coherence_protocol.cc:208: error: cannot call member function `virtual const std::string SimObject::name() const' without object
scons: *** [ALPHA_SE/mem/cache/coherence/coherence_protocol.o] Error 1
scons: building terminated because of errors.

I think this is because I used DPRINTF. But I don't know how to fix it.





Steve Reinhardt <[EMAIL PROTECTED]> wrote:
Can you give the specific context where you're using it? It calls
name() to grab the name of the enclosing SimObject if you use it in a
SimObject method, but there's also a global name() function that it
should find if it's not in a SimObject method.

You can run into problems if you use it in a template of a SimObject
method though.



Steve

Chenjie Yu wrote:
> Hi,
>
> I am using M5_1.1.
>
> I am trying to insert DPRINTF statement in
> /mem/cache/coherence/coherence_protocol.cc, which works in many other files.
>
> However, I always get the same error:
> m5/mem/cache/coherence/coherence_protocol.cc:208: error: cannot call
> member function `virtual const std::string SimObject::name() const'
> without object
>
> I looked into other files and included the
> #include "base/trace.hh" // for DPRINTF
>
> But the error is still there.
>
> Can anybody tell me how to fix that?
>
> Thanks,
>
> Chenjie
>
> ------------------------------------------------------------------------
> Check out the all-new Yahoo! Mail beta
>
> - Fire up a more powerful email and get things done faster.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> m5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users


Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to