comparison VMS.c @ 182:7523ee70d66c

merge changes from default
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Fri, 06 Jan 2012 18:55:05 +0100
parents 3bd35fc83c61 ad8213a8e916
children 50b29548d4f0
comparison
equal deleted inserted replaced
86:f402a989d96c 87:e4e80ac6ac2c
116 _VMSMasterEnv->freeListHead = VMS_ext__create_free_list(); 116 _VMSMasterEnv->freeListHead = VMS_ext__create_free_list();
117 117
118 118
119 //============================= MEASUREMENT STUFF ======================== 119 //============================= MEASUREMENT STUFF ========================
120 #ifdef MEAS__TIME_MALLOC 120 #ifdef MEAS__TIME_MALLOC
121 _VMSMasterEnv->mallocTimeHist = makeFixedBinHistExt( 100, 0, 100, 121 _VMSMasterEnv->mallocTimeHist = makeFixedBinHistExt( 100, 0, 30,
122 "malloc_time_hist"); 122 "malloc_time_hist");
123 _VMSMasterEnv->freeTimeHist = makeFixedBinHistExt( 80, 0, 100, 123 _VMSMasterEnv->freeTimeHist = makeFixedBinHistExt( 100, 0, 30,
124 "free_time_hist"); 124 "free_time_hist");
125 #endif 125 #endif
126 #ifdef MEAS__TIME_PLUGIN 126 #ifdef MEAS__TIME_PLUGIN
127 _VMSMasterEnv->reqHdlrLowTimeHist = makeFixedBinHistExt( 1000, 0, 100, 127 _VMSMasterEnv->reqHdlrLowTimeHist = makeFixedBinHistExt( 100, 0, 200,
128 "plugin_low_time_hist"); 128 "plugin_low_time_hist");
129 _VMSMasterEnv->reqHdlrHighTimeHist = makeFixedBinHistExt( 1000, 0, 100, 129 _VMSMasterEnv->reqHdlrHighTimeHist = makeFixedBinHistExt( 100, 0, 200,
130 "plugin_high_time_hist"); 130 "plugin_high_time_hist");
131 #endif 131 #endif
132 //======================================================================== 132 //========================================================================
133 133
134 //===================== Only VMS__malloc after this ==================== 134 //===================== Only VMS__malloc after this ====================
460 *Having a standard VMSNewPrReqData struc allows the language to create and 460 *Having a standard VMSNewPrReqData struc allows the language to create and
461 * free the struc, while VMS knows how to get the newPr if it wants it, and 461 * free the struc, while VMS knows how to get the newPr if it wants it, and
462 * it lets the lang have lang-specific data related to creation transported 462 * it lets the lang have lang-specific data related to creation transported
463 * to the plugin. 463 * to the plugin.
464 */ 464 */
465 __attribute__ ((noinline)) void 465 void
466 VMS__send_create_procr_req( void *semReqData, VirtProcr *reqstingPr ) 466 VMS__send_create_procr_req( void *semReqData, VirtProcr *reqstingPr )
467
468 { VMSReqst req; 467 { VMSReqst req;
469 468
470 req.reqType = createReq; 469 req.reqType = createReq;
471 req.semReqData = semReqData; 470 req.semReqData = semReqData;
472 req.nextReqst = reqstingPr->requests; 471 req.nextReqst = reqstingPr->requests;
495 * function to just poof into thin air -- the virtual processor's trace 494 * function to just poof into thin air -- the virtual processor's trace
496 * never returns from this call, but instead the virtual processor's trace 495 * never returns from this call, but instead the virtual processor's trace
497 * gets suspended in this call and all the virt processor's state disap- 496 * gets suspended in this call and all the virt processor's state disap-
498 * pears -- making that suspend the last thing in the virt procr's trace. 497 * pears -- making that suspend the last thing in the virt procr's trace.
499 */ 498 */
500 __attribute__ ((noinline)) void 499 void
501 VMS__send_dissipate_req( VirtProcr *procrToDissipate ) 500 VMS__send_dissipate_req( VirtProcr *procrToDissipate )
502 { VMSReqst req; 501 { VMSReqst req;
503 502
504 req.reqType = dissipate; 503 req.reqType = dissipate;
505 req.nextReqst = procrToDissipate->requests; 504 req.nextReqst = procrToDissipate->requests;
506 procrToDissipate->requests = &req; 505 procrToDissipate->requests = &req;
555 /*This inserts the semantic-layer's request data into standard VMS carrier 554 /*This inserts the semantic-layer's request data into standard VMS carrier
556 * request data-struct is allocated on stack of this call & ptr to it sent 555 * request data-struct is allocated on stack of this call & ptr to it sent
557 * to plugin 556 * to plugin
558 *Then it does suspend, to cause request to be sent. 557 *Then it does suspend, to cause request to be sent.
559 */ 558 */
560 /*inline*/__attribute__ ((noinline)) void 559 inline void
561 VMS__send_sem_request( void *semReqData, VirtProcr *callingPr ) 560 VMS__send_sem_request( void *semReqData, VirtProcr *callingPr )
562 { VMSReqst req; 561 { VMSReqst req;
563 562
564 req.reqType = semantic; 563 req.reqType = semantic;
565 req.semReqData = semReqData; 564 req.semReqData = semReqData;
566 req.nextReqst = callingPr->requests; 565 req.nextReqst = callingPr->requests;
568 567
569 VMS__suspend_procr( callingPr ); 568 VMS__suspend_procr( callingPr );
570 } 569 }
571 570
572 571
573 /*inline*/ __attribute__ ((noinline)) void 572 inline void
574 VMS__send_VMSSem_request( void *semReqData, VirtProcr *callingPr ) 573 VMS__send_VMSSem_request( void *semReqData, VirtProcr *callingPr )
575
576 { VMSReqst req; 574 { VMSReqst req;
577 575
578 req.reqType = VMSSemantic; 576 req.reqType = VMSSemantic;
579 req.semReqData = semReqData; 577 req.semReqData = semReqData;
580 req.nextReqst = callingPr->requests; //gab any other preceeding 578 req.nextReqst = callingPr->requests; //gab any other preceeding
775 //SchedSlot ***allSchedSlots; //ptr to array of ptrs 773 //SchedSlot ***allSchedSlots; //ptr to array of ptrs
776 774
777 //Before getting rid of everything, print out any measurements made 775 //Before getting rid of everything, print out any measurements made
778 //forAllInDynArrayDo( _VMSMasterEnv->measHistsInfo, (DynArrayFnPtr)&printHist ); 776 //forAllInDynArrayDo( _VMSMasterEnv->measHistsInfo, (DynArrayFnPtr)&printHist );
779 //forAllInDynArrayDo( _VMSMasterEnv->measHistsInfo, (DynArrayFnPtr)&saveHistToFile); 777 //forAllInDynArrayDo( _VMSMasterEnv->measHistsInfo, (DynArrayFnPtr)&saveHistToFile);
780 //forAllInDynArrayDo( _VMSMasterEnv->measHistsInfo, &freeHistExt ); 778 //forAllInDynArrayDo( _VMSMasterEnv->measHistsInfo, &freeHist );
781 779
782 780
783 #ifdef MEAS__TIME_PLUGIN 781 #ifdef MEAS__TIME_PLUGIN
784 printHist( _VMSMasterEnv->reqHdlrLowTimeHist ); 782 printHist( _VMSMasterEnv->reqHdlrLowTimeHist );
785 saveHistToFile( _VMSMasterEnv->reqHdlrLowTimeHist ); 783 saveHistToFile( _VMSMasterEnv->reqHdlrLowTimeHist );