I tried that.
It didn't work. I got the same errors.

Nathan Binkert <[EMAIL PROTECTED]> wrote: you need to #include "base/trace.hh"

> I was try to insert DPRINTF
>
> In file  /mem/cache/coherence/coherence_protocol.cc,  (m5_1.1)
>
> 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. printf works, but I still want to 
> know what's wrong with DPRINTF.
>
>
> Nathan Binkert  wrote: > I am still having problems inserting DPRINTF in 
> coherence_protocol.cc
>>
>> printf works though, but I need to also get the cycle number and
>> processor number to analyze the printed trace, which comes naturally
>> with DPRINTF
>>
>> Does any one know how to do that?
>
> What exactly is your problem?  In order to use dprintf, you need to
> compile either debug or opt (not fast), and turn on some trace flags.
> running m5 with --help should give you some info.  The debugging page on
> the documentation section of the wiki has a bit more info.
>
>   Nate
> _______________________________________________
> m5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
>
>
>
> ---------------------------------
> Sponsored Link
>
> Degrees online in as fast as 1 Yr - MBA, Bachelor's, Master's, Associate - 
> Click now to apply
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users


 
---------------------------------
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

Reply via email to