changeset 75:52a02c918db8 Holistic_Model

add cache miss counter
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Tue, 08 May 2012 18:59:53 +0200
parents b73e4a6f3497
children 6647aea90477
files SSR_Counter_Recording.c SSR_Counter_Recording.h
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/SSR_Counter_Recording.c	Tue Apr 17 20:14:34 2012 +0200
     1.2 +++ b/SSR_Counter_Recording.c	Tue May 08 18:59:53 2012 +0200
     1.3 @@ -28,7 +28,7 @@
     1.4      list->next_free_index++; 
     1.5  }
     1.6  
     1.7 -void SSR__counter_handler(int evt_type, int vpid, int task, SlaveVP* pr, uint64 cycles, uint64 instrs)
     1.8 +void SSR__counter_handler(int evt_type, int vpid, int task, SlaveVP* pr, uint64 cycles, uint64 instrs, uint64 cachem)
     1.9  {
    1.10      
    1.11      if (pr->typeOfVP == Master || pr->typeOfVP == Shutdown)
    1.12 @@ -45,6 +45,7 @@
    1.13      
    1.14      e.cycles = cycles;
    1.15      e.instrs = instrs;
    1.16 +    e.cachem = cachem;
    1.17      
    1.18      if(pr){
    1.19          e.coreID = pr->coreAnimatedBy;
    1.20 @@ -112,7 +113,7 @@
    1.21           default:
    1.22               fprintf(counterfile, "unknown event");
    1.23       }
    1.24 -     fprintf(counterfile,", %d, %d, %llu, %llu",e->vp,e->task,e->cycles,e->instrs);
    1.25 +     fprintf(counterfile,", %d, %d, %llu, %llu, %llu",e->vp,e->task,e->cycles,e->instrs,e->cachem);
    1.26       if(e->coreID >=0)
    1.27           fprintf(counterfile,", %d",e->coreID);
    1.28       fprintf(counterfile,"\n");
     2.1 --- a/SSR_Counter_Recording.h	Tue Apr 17 20:14:34 2012 +0200
     2.2 +++ b/SSR_Counter_Recording.h	Tue May 08 18:59:53 2012 +0200
     2.3 @@ -18,13 +18,14 @@
     2.4     int task;
     2.5     uint64 cycles;
     2.6     uint64 instrs;
     2.7 +   uint64 cachem;
     2.8  } CounterEvent;
     2.9  
    2.10  FILE* counterfile;
    2.11  
    2.12  void SSR__init_counter_data_structs();
    2.13  
    2.14 -void SSR__counter_handler(int evt_type, int vpid, int task, SlaveVP* pr, uint64 cycles, uint64 instrs);
    2.15 +void SSR__counter_handler(int evt_type, int vpid, int task, SlaveVP* pr, uint64 cycles, uint64 instrs, uint64 cachem);
    2.16  
    2.17  void set_counter_file(FILE* f);
    2.18