diff VMS.c @ 167:981acd1db6af

Separate UCC recording from VMS core and put it into SSR plugin
author Nina Engelhardt
date Mon, 05 Dec 2011 18:59:48 +0100
parents aefd87f9d12f
children 3bd35fc83c61
line diff
     1.1 --- a/VMS.c	Tue Oct 18 15:53:04 2011 +0200
     1.2 +++ b/VMS.c	Mon Dec 05 18:59:48 2011 +0100
     1.3 @@ -186,10 +186,6 @@
     1.4     
     1.5     MakeTheMeasHists();
     1.6     
     1.7 -   #ifdef DETECT_DEPENDENCIES
     1.8 -   _VMSMasterEnv->dependencies = VMS__malloc(10*sizeof(void*));
     1.9 -   _VMSMasterEnv->dependenciesInfo = makePrivDynArrayInfoFrom((void***)&(_VMSMasterEnv->dependencies),10);
    1.10 -   #endif
    1.11  
    1.12     #ifdef DETECT_LOOP_GRAPH
    1.13     _VMSMasterEnv->loop_graph = VMS__malloc(10*sizeof(void*));
    1.14 @@ -245,7 +241,7 @@
    1.15         	hw_event.config = 0x0000000000000000; //cycles
    1.16          _VMSMasterEnv->cycles_counter_fd[coreIdx] = syscall(__NR_perf_event_open, &hw_event,
    1.17   		0,//pid_t pid, 
    1.18 -		-1,//int cpu, 
    1.19 +		coreIdx,//int cpu, 
    1.20  		-1,//int group_fd,
    1.21  		0//unsigned long flags
    1.22  	);
    1.23 @@ -256,7 +252,7 @@
    1.24          hw_event.config = 0x0000000000000001; //instrs
    1.25          _VMSMasterEnv->instrs_counter_fd[coreIdx] = syscall(__NR_perf_event_open, &hw_event,
    1.26   		0,//pid_t pid, 
    1.27 -		-1,//int cpu, 
    1.28 +		coreIdx,//int cpu, 
    1.29  		-1,//int group_fd,
    1.30  		0//unsigned long flags
    1.31  	);
    1.32 @@ -788,37 +784,7 @@
    1.33     //forAllInDynArrayDo( _VMSMasterEnv->measHistsInfo, (DynArrayFnPtr)&printHist );
    1.34     //forAllInDynArrayDo( _VMSMasterEnv->measHistsInfo, (DynArrayFnPtr)&saveHistToFile);
    1.35     //forAllInDynArrayDo( _VMSMasterEnv->measHistsInfo, &freeHistExt );
    1.36 -#ifdef DETECT_DEPENDENCIES
    1.37 -   FILE* output;
    1.38 -   int n;
    1.39 -   char filename[255];    
    1.40 -    for(n=0;n<255;n++)
    1.41 -    {
    1.42 -        sprintf(filename, "./counters/Dependencies.%d.dot",n);
    1.43 -        output = fopen(filename,"r");
    1.44 -        if(output)
    1.45 -        {
    1.46 -            fclose(output);
    1.47 -        }else{
    1.48 -            break;
    1.49 -        }
    1.50 -    }
    1.51 -   if(n<255){
    1.52 -    printf("Saving Dependencies to File: %s ...\n", filename);
    1.53 -    output = fopen(filename,"w+");
    1.54 -    if(output!=NULL){
    1.55 -        set_dependency_file(output);
    1.56 -        fprintf(output,"digraph Dependencies {\n");
    1.57 -        set_dot_file(output);
    1.58 -        forAllInDynArrayDo(_VMSMasterEnv->counter_history_array_info, &print_dot_node_info );
    1.59 -        forAllInDynArrayDo( _VMSMasterEnv->dependenciesInfo, &print_dependency_to_file );
    1.60 -        fprintf(output,"}\n");
    1.61 -    } else
    1.62 -        printf("Opening Dependencies file failed. Please check that folder \"counters\" exists in run directory.\n");
    1.63 -   } else {
    1.64 -       printf("Could not open Dependencies file, please clean \"counters\" folder. (Must contain less than 255 files.)\n");
    1.65 -   }
    1.66 -#endif
    1.67 +
    1.68     #ifdef DETECT_LOOP_GRAPH
    1.69     FILE* loop_output;
    1.70     int loop_n;