comparison VMS.c @ 170:92d97c6c09d6

Added tag version_that_goes_into_paper for changeset d1dd9e6ee72c
author Merten Sach <msach@mailbox.tu-berlin.de>
date Fri, 16 Dec 2011 20:01:36 +0100
parents cb7277bac147
children bfaebdf60df3
comparison
equal deleted inserted replaced
77:9e727cdc45d4 82:c3f33b1970fd
98 VirtProcr **masterVPs; 98 VirtProcr **masterVPs;
99 SchedSlot ***allSchedSlots; //ptr to array of ptrs 99 SchedSlot ***allSchedSlots; //ptr to array of ptrs
100 100
101 101
102 //Make the master env, which holds everything else 102 //Make the master env, which holds everything else
103 _VMSMasterEnv = malloc( sizeof(MasterEnv) ); 103 _VMSMasterEnv = malloc( sizeof(MasterEnv) );
104 memset( _VMSMasterEnv, 0, sizeof(MasterEnv) );
104 105
105 //Very first thing put into the master env is the free-list, seeded 106 //Very first thing put into the master env is the free-list, seeded
106 // with a massive initial chunk of memory. 107 // with a massive initial chunk of memory.
107 //After this, all other mallocs are VMS__malloc. 108 //After this, all other mallocs are VMS__malloc.
108 _VMSMasterEnv->freeLists = VMS_ext__create_free_list(); 109 _VMSMasterEnv->freeLists = VMS_ext__create_free_list();
679 680
680 //Before getting rid of everything, print out any measurements made 681 //Before getting rid of everything, print out any measurements made
681 //forAllInDynArrayDo( _VMSMasterEnv->measHistsInfo, (DynArrayFnPtr)&printHist ); 682 //forAllInDynArrayDo( _VMSMasterEnv->measHistsInfo, (DynArrayFnPtr)&printHist );
682 //forAllInDynArrayDo( _VMSMasterEnv->measHistsInfo, (DynArrayFnPtr)&saveHistToFile); 683 //forAllInDynArrayDo( _VMSMasterEnv->measHistsInfo, (DynArrayFnPtr)&saveHistToFile);
683 //forAllInDynArrayDo( _VMSMasterEnv->measHistsInfo, &freeHistExt ); 684 //forAllInDynArrayDo( _VMSMasterEnv->measHistsInfo, &freeHistExt );
685 /*
684 #ifdef MEAS__TIME_PLUGIN 686 #ifdef MEAS__TIME_PLUGIN
685 printHist( _VMSMasterEnv->reqHdlrLowTimeHist ); 687 printHist( _VMSMasterEnv->reqHdlrLowTimeHist );
686 saveHistToFile( _VMSMasterEnv->reqHdlrLowTimeHist ); 688 saveHistToFile( _VMSMasterEnv->reqHdlrLowTimeHist );
687 printHist( _VMSMasterEnv->reqHdlrHighTimeHist ); 689 printHist( _VMSMasterEnv->reqHdlrHighTimeHist );
688 saveHistToFile( _VMSMasterEnv->reqHdlrHighTimeHist ); 690 saveHistToFile( _VMSMasterEnv->reqHdlrHighTimeHist );
710 VMS__dissipate_procr( masterVPs[ coreIdx ] ); 712 VMS__dissipate_procr( masterVPs[ coreIdx ] );
711 713
712 freeSchedSlots( allSchedSlots[ coreIdx ] ); 714 freeSchedSlots( allSchedSlots[ coreIdx ] );
713 } 715 }
714 #endif 716 #endif
717 */
715 #ifdef MEAS__TIME_STAMP_SUSP 718 #ifdef MEAS__TIME_STAMP_SUSP
716 printHist( _VMSMasterEnv->pluginTimeHist ); 719 printHist( _VMSMasterEnv->pluginTimeHist );
717 for( coreIdx = 0; coreIdx < NUM_CORES; coreIdx++ ) 720 for( coreIdx = 0; coreIdx < NUM_CORES; coreIdx++ )
718 { 721 {
719 freeVMSQ( readyToAnimateQs[ coreIdx ] ); 722 freeVMSQ( readyToAnimateQs[ coreIdx ] );
768 printf("%s",msgStr); 771 printf("%s",msgStr);
769 fflush(stdin); 772 fflush(stdin);
770 exit(1); 773 exit(1);
771 } 774 }
772 775
776 //======================= Measurement =======================
777 #ifdef MEAS__TIME_2011_SYS
778 uint64
779 VMS__give_num_plugin_cycles()
780 { return _VMSMasterEnv->totalPluginCycles;
781 }
782
783 uint32
784 VMS__give_num_plugin_animations()
785 { return _VMSMasterEnv->numPluginAnimations;
786 }
787 #endif