The process object gem5 uses to keep track of your simulated program doesn't fully checkpoint/restore the file descriptors you might have for open files. That means if you open a real file in your simulated program, seek around in it, and take a checkpoint, when you restore you might not end up reading/writing at the place you expect. Since the files live outside of the simulation and are subject to the whims of the host system, other processes, external editting, etc., it would be difficult in general to totally checkpoint/restore the state of those files and their interaction with your process.
Gabe On Wed, May 3, 2017 at 1:03 PM, Moussa, Ayman <[email protected] > wrote: > Hi > > > I've managed to add the checkpointing code around my region of interest > > > e.g > > m5_checkpoint(0,0); > > // Region of interest > > > However, gem5 gives me back a warning: > > > warn: Checkpoints for file descriptors currently do not work. > > > What does this actually mean? > > > Thanks > ------------------------------ > *From:* gem5-users <[email protected]> on behalf of Ferran Olid > <[email protected]> > *Sent:* 03 May 2017 15:54:42 > > *To:* [email protected] > *Subject:* Re: [gem5-users] Fast forwarding question > > > Hi, > > > First you will need to just compile (using the -c flag) the m5op_ARCH.S, > where ARCH is the architecture you are using (e.g: m5op_x86.S if you are > using X86) and your code separately. Once you have them compiled, just join > the whole thing using something like `gcc program.o > /path/to/your/compiled/m5op/m5op_x86.o -o program`. > > > Cheers, > > Ferran O. > > On 03/05/17 16:46, Moussa, Ayman wrote: > > Hi > > > Thanks for your suggestion, I am attempting to try it out but I was just > wondering, what files/lines do I need to add to my Makefile in order to > compile/link the m5 files for the checkpointing code? My application uses > C++. > > > Thanks > ------------------------------ > *From:* gem5-users <[email protected]> > <[email protected]> on behalf of Ferran Olid > <[email protected]> <[email protected]> > *Sent:* 03 May 2017 09:00:32 > *To:* [email protected] > *Subject:* Re: [gem5-users] Fast forwarding question > > > Hi, > > > I think that the best solution to your problem is to use a checkpoint. You > can use the library m5op.h in util/m5/ to call the function > m5_checkpoint(...) from the code you are simulating (assuming it's C or > C++) and take a checkpoint once you get to your region of interest. Then > you just need to restore that checkpoint using the CPU you want to use. > > > Hope this helped, > > Ferran O. > > On 02/05/17 20:41, Moussa, Ayman wrote: > > Hi everyone > > > I'm relatively new to the concept of fast-forwarding. But from what I > understand is that you can cause gem5 to switch CPU models to a more > detailed one after a certain number of instructions have been simulated > using the first CPU. I have a region of interest in my source code and I > want to switch CPUs as soon as the first line of that code starts executing > because it takes 3 hours to reach it currently just using the DerivO3CPU. > So how do I know/find out how many instructions I need to run the first CPU > for before switching to the more detailed CPU? > > > Thanks > > > > > _______________________________________________ > gem5-users mailing > [email protected]http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users > > > > > _______________________________________________ > gem5-users mailing > [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
