Hi Gem Users,

I run a simple program (same binary) on both gem5 (aarch64) & ARM Juno board.
Below is the code:
int main(void)
{
        int i,y;
        for (i=0;i<100;i++)
                y++;
        return 0;
}

However, number of instruction reported by gem5 & linux perf tool for
the same program binary is not same, or not even comparable.
Please give some insight on this.
num of inst reported by perf =      1096938
num of inst reported by gem5 = 10102135

Program binary name - hello
command used on Juno:
sudo perf stat -C 1 -e cpu-cycles,instructions taskset -c 1 ./hello
1674642      cpu-cycles        [99.94%]
1096938      instructions      #    0.66  insns per cycle (1096938/1674642=0.66)

Command used on gem5:
build/ARM/gem5.opt -d /home/vpathak/gem5_git/gem5/m5out_hello_ash
configs/example/fs.py \
    --checkpoint-restore=1 --restore-with-cpu=DerivO3CPU
--script=/home/vpathak/gem5_git/gem5/configs/boot/nas.rcS \
    
--kernel=/home/vpathak/gem5_git/full-system-images/binaries/vmlinux.aarch64.20140821
--machine-type=VExpress_EMM64 \
    
--dtb-file=/home/vpathak/gem5_git/full-system-images/binaries/vexpress.aarch64.20140821.dtb
\
    
--disk-image=/home/vpathak/gem5_git/full-system-images/disks/aarch64-ubuntu-trusty-headless.img
\
    --cpu-type=DerivO3CPU --arm-iset=aarch64 --num-cpus=1
--cpu-clock=3GHz --caches --l2cache --l3cache

nas.rcS:
/sbin/m5 resetstats
/opt/native/hello
/sbin/m5 exit

system.cpu.committedInsts     10102135
system.cpu.numCycles            22634230
system.cpu.ipc                         0.446321  (10102135/22634230 = 0.446321)

Thanks for your time in advance.

-- 
with regards,
Virendra Kumar Pathak
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to