Hi,

I wrote a very simple code to see how does marss simulate kernel
instructions. The simulator was built by a simple "scons -Q" command.
Here is my code which should involve dominant kernel instruction
execution.

************************my code********************************
#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
     for (int i = 0; i < 1000; i++) {
         write(1, "1", 1);
     }
}
************************my code********************************

I have a quick question about the result I got. The total instruction
count of my code is 6292996 which looks reasonable. But why the access
count of L1 Instruction cache is only 922202 which is much smaller
than the code instruction count? Does marssx86 simulate kernel
instructions in the pipeline and caches? Even decoder has a very low,
381631, decoded x96 instruction count,. I could be wrong in
understanding the total number of instructions been executed, so does
someone have any ideas about this?

**********************************statistics**************************************
external {
... ... ...

c0 {
      insns_in_mode (total 6292996) {
        [  0.0% ] userlib = 0; { (zero) }
        [  0.0% ] legacy16 = 0; { (zero) }
        [  0.0% ] microcode = 0; { (zero) }
        [  0.0% ] idle = 0; { (zero) }
        [  0.0% ] kernel32 = 0; { (zero) }
        [ 77.7% ] kernel64 = 4890778;
        [  0.0% ] user32 = 0; { (zero) }
        [ 22.3% ] user64 = 1402218;
      }
      uops_in_mode { (zero) }
      cycles_in_mode (total 10656158) {
        [  0.0% ] userlib = 0; { (zero) }
        [  0.0% ] legacy16 = 0; { (zero) }
        [  0.0% ] microcode = 0; { (zero) }
        [  0.0% ] idle = 0; { (zero) }
        [  0.0% ] kernel32 = 0; { (zero) }
        [ 77.0% ] kernel64 = 8200440;
        [  0.0% ] user32 = 0; { (zero) }
        [ 23.0% ] user64 = 2455718;
      }
    }
... ... ...
}

I also looked into memory node for c0:

memory {
... ... ...
c0 {
... ... ...

L1I {
        lat_count { (zero) }
        mesi_stats { (zero) }
        snooprequest { (zero) }
        annul = 0; { (zero) }
        latency { (zero) }
        cpurequest {
          stall (total 4) {
            [  0.0% ] write { (zero) }
            [  100% ] read (total 4) {
              [  100% ] cache_port = 4;
              [  0.0% ] buffer_full = 0; { (zero) }
              [  0.0% ] dependency = 0; { (zero) }
            }
          }
          redirects = 0; { (zero) }
          count (total 922202) {
            [  7.8% ] miss (total 72074) {
              [  0.0% ] write = 0; { (zero) }
              [  7.8% ] read = 72074;
            }
            [ 92.2% ] hit {
              write { (zero) }
              read (total 850128) {
                [  100% ] hit (total 850128) {
                  [  0.0% ] forward = 0; { (zero) }
                  [  100% ] hit = 850128;
                }
              }
            }
          }
          queueFull = 0; { (zero) }
      }
... ... ...
}
... ... ...
}

decoder {
    throughput {
      uops = 598129;
      bytes = 1440247;
      x86_insns = 381631;
      basic_blocks = 73080;
    }
    bbcache { (zero) }
    x86_decode_type[5] = {
      Minimum:                     5
      Maximum:                376550
      Average:                 0.020
      Total Sum:              381962
      Weighted Sum:             7457
      Threshold:                  39
      [ 98.6% ]      0 376550 fast
      [  1.2% ]      1   4713 complex
      [  0.0% ]      3     42 sse
      [  0.2% ]      4    652 assist
    };
    reclaim_rounds = 42;
    pagecache {
      invalidates[6] = {
        Minimum:                     0
        Maximum:                     0
        Average:                  -nan
        Total Sum:                   0
        Weighted Sum:                0
        Threshold:                   1
      }; { (zero) }
      inserts = 43;
      count = 2;
   }
    page_crossings { (zero) }
    bb_decode_type (total 73076) {
      [ 94.1% ] all_insns_fast = 68731;
      [  5.9% ] some_complex_insns = 4345;
    }
  }

**********************************statistics**************************************

_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Reply via email to