Hello,

I'm attempting to add some power gating functionality (that I believe to be
logically working properly)  to the Minor CPU wth the ALPHA ISA (and
running PARSEC benchmarks) but I have run into an issue with stats
reporting that may or may not be a huge deal.

I used the hackback script at
http://grok.gem5.org/xref/gem5/configs/boot/hack_back_ckpt.rcS to run and
set a checkpoint using the following command:
./build/ALPHA/gem5.debug configs/example/fs.py
--disk-image=linux-parsec-2-1-m5-with-test-inputs.img --frame-capture
--script=hack_back_ckpt.rcS  --cpu-type=atomic

After it runs and sets a checkpoint, I restore with a minor CPU running
this:
./build/ALPHA/gem5.debug configs/example/fs.py
--disk-image=linux-parsec-2-1-m5-with-test-inputs.img --frame-capture
--script=blackscholes_1c_test_ckpts.rcS -r 1 --restore-with-cpu=minor
--checkpoint-dir=m5out --caches

This is supposed to take the the previously made checkpoint and switch to
the Minor CPU and run the blackscholes benchmark.  I have set the following
stats up in execute.cc and execute.hh:
Stats::Scalar intAluAccesses;
Stats::Scalar fpAluAccesses;
Stats::Scalar fpWokenUp;
Stats::Scalar fpMaxSleep;
Stats::Scalar fpMinSleep;
Stats::Scalar fpTotalSleep;
Stats::Scalar tWakeup;
Stats::Scalar tSleep;
Stats::Scalar tDelay;
Stats::Formula fpAvgSleep;

When I run these commands, in m5out/stats.txt, I see that all of them say
system.cpu.* == 0 (for all my custom stats). I'd expect them to actually be
under system.switch_cpus.* instead since I'm switching TO the minor CPU but
the stats aren't there.

The thing that makes this a little weirder is that when I run the next
command, I get stats out:
./build/ALPHA/gem5.debug --debug-flags=MinorPG configs/example/fs.py
--disk-image=linux-parsec-2-1-m5-with-test-inputs.img --frame-capture
--script=blackscholes_1c_test_ckpts.rcS  --cpu-type=minor --caches

With this, I can see things such as t_wakeup = 3 when that's just set as a
hardcoded value, essentially:
#define Twakeup 3
tWakeup = Twakeup;

At the very least, I should expect tWakeup, tSleep, and tDelay, to be
values regardless.  My code is such that:
.....
 ///get extra cycles due to power gating
inst->isFloating() ? fpAluAccesses++ : intAluAccesses++;
if(inst->isFloating()){
    extra_dest_retire_lat += getAdditionalPowerGateCycles();
}
....
---------------------------------------------------------------------------------
Cycles
        Execute::getAdditionalPowerGateCycles(){
            //Couldn't find where to add these to make them work...so we'll
set them every time

            tWakeup = Twakeup;
            tSleep = Tsleep;
            tDelay = Tdelay;
            ......
}

With this code, I'd also expect to see fpAluAccesses and intAluAccesses be
somethign other than 0 since my code snippet is in the execute's issue
function when it's issuing an instruction into an FU.

If anyone has any advice on why I can't restore with a Minor CPU model and
get any stats but can when I run gem5 without checkpointing, please let me
know!

Thank you,
Dave Kindel
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to