You need to include base/trace.hh which defines DPRINTF itself.

Gabe

On Sat, Nov 21, 2020 at 8:33 PM yujiecui--- via gem5-users <
gem5-users@gem5.org> wrote:

> I want to know the cache information when the replacement algorithm is
> executed. So I made the following changes in the latest version of gem5. I
> added a line of DebugFlag('ReplacementInfo') command to the
> /home/cuiyujie/workspace/workGem5/gem5/src/mem/cache/replacement_policies/SConscript
> file. Then I added the header file #include "debug/ReplacementInfo.hh" in
> the /home/cuiyujie/workspace/workGem5/gem5/build/X86/params/RandomRP.cc
> file. Then I used DPRINTF(ReplacementInfo, "candidates"); command in this
> file. But an error occurred during compilation.
>
> build/X86/mem/cache/replacement_policies/random_rp.cc: In member
> function'virtual ReplaceableEntry* RandomRP::getVictim(const
> ReplacementCandidates&) const':
> build/X86/mem/cache/replacement_policies/random_rp.cc:82:13:
> error:'ReplacementInfo' was not declared in this scope
>      DPRINTF(ReplacementInfo, "candidates");
>              ^
> build/X86/mem/cache/replacement_policies/random_rp.cc:82:13: note:
> suggested alternative:
> In file included from
> build/X86/mem/cache/replacement_policies/random_rp.cc:44:0:
> build/X86/debug/ReplacementInfo.hh:18:19: note:'Debug::ReplacementInfo'
>  extern SimpleFlag ReplacementInfo;
>                    ^
> build/X86/mem/cache/replacement_policies/random_rp.cc:82:42:
> error:'DPRINTF' was not declared in this scope
>      DPRINTF(ReplacementInfo, "candidates");
>                                           ^
> scons: *** [build/X86/mem/cache/replacement_policies/random_rp.o] Error 1
> scons: building terminated because of errors.
>
> What do you need to define first to use DPRINTF?
> _______________________________________________
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to