On Thu, Oct 13, 2011 at 9:24 AM, Islam Atta <[email protected]> wrote:

> Hello everyone,
>
> I need to hack MARSS so as to inject instructions from an instruction trace
> file, rather than from QEMU's system image. I've been searching in the code
> where does PTLSim get the instructions, but until now, I haven't made any
> positive progress.
>
> In Marss the simulator gets instruction stream from QEMU. Most of the
interface between simulator and QEMU is coded in 'ptlsim/sim/ptl-qemu.*'
files.  Take a look at 'copy_from_user' function in 'ptl-qemu.cpp' file.
This function uses 'source' as Instruction Pointer and uses 'ldub_code'
function of QEMU to load code from that address. You can replace this code
to read the instructions from your trace file.  Before that, you should
restore all register values for correct execution of all instructions. Due
to aggressive nature of OOO model, it will try to load instructions from
not-taken branches and you should handle that in you implementation also.

- Avadh


> Any help/advice is highly appreciated.
>
> --
> Best regards,
> Islam Atta
>
>
> _______________________________________________
> http://www.marss86.org
> Marss86-Devel mailing list
> [email protected]
> https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel
>
>
_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Reply via email to