ok thanks On 12/13/11, nathan binkert <[email protected]> wrote: > You need to modify the dprintf function and the format string as well > if you want to add something like this. > > On Tue, Dec 13, 2011 at 2:36 AM, Mahmood Naderan <[email protected]> > wrote: >> I only added __FILE__ >> >> Trace::dprintf(curTick(), name(), __FILE__, __VA_ARGS__); >> >> however the output became messy. >> >> 1254044000: global: build/X86_SE/cpu/o3/regfile.hh<bad format><bad >> format><bad format>1254044000: global: build/X86_SE/cpu/o3/regfile.hh<bad >> format><bad format><bad format>1254044000: global: >> build/X86_SE/cpu/o3/regfile.hh<bad format><bad format><bad >> format>1254044000: global: build/X86_SE/cpu/o3/regfile.hh<bad format><bad >> format><bad format>1254044000: global: build/X86_SE/cpu/o3/regfile.hh<bad >> format><bad format><bad format> >> >> -- >> // Naderan *Mahmood; >> >> >> >> On Tue, Dec 13, 2011 at 12:23 PM, Gabriel Michael Black >> <[email protected]> wrote: >>> >>> >>> http://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html#Standard-Predefined-Macros >>> >>> >>> Quoting Mahmood Naderan <[email protected]>: >>> >>>> Hi, >>>> Is it possible to modify DPRINTF in such a way to print the file name >>>> (or >>>> file path)? >>>> Currently When I want to find where does this message came from: >>>> >>>> 1254134000: global: DynInst: [sn:329] Instruction created. Instcount for >>>> system.switch_cpus = 64 >>>> >>>> I have to grep "Instruction created" which has more than one instance. >>>> It will be more handy if we see: >>>> >>>> 1254134000: {cpu/base_dyn_inst_impl.hh} global: DynInst: [sn:329] >>>> Instruction created. Instcount for system.switch_cpus = 64 >>>> >>>> I see that DPRINTF is defined in trace.hh: >>>> #define DPRINTF(x, ...) do { \ >>>> using namespace Debug; \ >>>> if (DTRACE(x)) \ >>>> Trace::dprintf(curTick(), name(), __VA_ARGS__); \ >>>> } while (0) >>>> >>>> but don't know how to include file path. >>>> Any one know? >>>> -- >>>> // Naderan *Mahmood; >>>> >>> >>> >>> _______________________________________________ >>> 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 >
-- -- // Naderan *Mahmood; _______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
