On Mon, June 11, 2012 3:05 am, xuxin wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
>> You don't need to add any code to gem5, at least not for the dumping
>> statistics. You only need to add some code to your application. For
>> example, take a look at the function do_dump_stats() in file
>> util/m5/m5.c.
>>
>> --
>> Nilay
>> _______________________________________________
>> gem5-users mailing list
>> gem5-users@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
>
> thank you for your reply.
>
> the function do_dump_stats() call function m5_dump_stats().
>
> in util/m5/m5op_x86.S :
> //=======================
> #define TWO_BYTE_OP(name, number)         \
>         .globl name;                      \
>         .func name;                       \
> name:                                     \
>         .byte 0x0F, 0x04;                 \
>         .word number;                     \
>         ret;                              \
>         .endfunc;
>
> TWO_BYTE_OP(m5_dump_stats, dumpstats_func)
> //=========================
> // in util/m5/m5ops.h
> #define dumpstats_func          0x41
> //=========================
>
> 1. "m5_dump_stats()" defined as a global fucntion, is  "0x0F04" a pseudo
> instruction in m5?  "0x0041" is the interrupt vector?
> there are no machine code like "0x0F04" in X86 ISA.
>
> 2.  how to change the function "m5_dump_stats()" in m5, or how to add a
> new pseudo instruction like m5_dump_stats()?
> or the machine code like "0x0F04" parsed by which file ?
>

Why don't you try running the binary generated by util/m5/m5.c in SE mode
of gem5? I think so far you have not even tried to do anything at all on
your own. Unless you try to get your hands dirty by writing and executing
some code, I hardly think that you would be able to use gem5 to get any
meaningful results.

--
Nilay

_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to