Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
diff probes.c @ 53:42dd44df1bb0
Init changed to only use VMS__malloc & uses VMS__malloc versions of utilities
| author | Me |
|---|---|
| date | Mon, 01 Nov 2010 21:21:32 -0700 |
| parents | f59cfa31a579 |
| children | f8508572f3de |
line diff
1.1 --- a/probes.c Sat Oct 30 21:53:55 2010 -0700 1.2 +++ b/probes.c Mon Nov 01 21:21:32 2010 -0700 1.3 @@ -31,17 +31,6 @@ 1.4 1.5 //==================== Probes ================= 1.6 #ifdef STATS__USE_TSC_PROBES 1.7 -int32 1.8 -VMS__create_single_interval_probe( char *nameStr ) 1.9 - { IntervalProbe *newProbe; 1.10 - int32 idx; 1.11 - 1.12 - newProbe = malloc( sizeof(IntervalProbe) ); 1.13 - newProbe->nameStr = nameStr; //caller frees if not constant on stack 1.14 - newProbe->hist = NULL; 1.15 - idx = addToDynArray( newProbe, _VMSMasterEnv->dynIntervalProbesInfo ); 1.16 - return idx; 1.17 - } 1.18 1.19 int32 1.20 VMS__create_histogram_probe( int32 numBins, float32 startValue, 1.21 @@ -131,7 +120,7 @@ 1.22 1.23 VMS__send_VMSSem_request( &reqData, animPr ); 1.24 1.25 - return animPr->dataReturnedFromReq; 1.26 + return animPr->dataRetFromReq; 1.27 } 1.28 1.29 /*Use this version from outside VMS -- it uses external malloc, and modifies 1.30 @@ -154,8 +143,19 @@ 1.31 return newProbe; 1.32 } 1.33 1.34 + 1.35 +/*Only call from inside master or main startup/shutdown thread 1.36 + */ 1.37 +void 1.38 +VMS_impl__free_probe( IntervalProbe *probe ) 1.39 + { if( probe->hist != NULL ) freeDblHist( probe->hist ); 1.40 + if( probe->nameStr != NULL) VMS__free( probe->nameStr ); 1.41 + VMS__free( probe ); 1.42 + } 1.43 + 1.44 + 1.45 int32 1.46 -VMS_impl__record_time_point_into_new_probe( char *nameStr, VirtProcr *animPr ) 1.47 +VMS_impl__record_time_point_into_new_probe( char *nameStr, VirtProcr *animPr) 1.48 { IntervalProbe *newProbe; 1.49 struct timeval *startStamp; 1.50 float64 startSecs; 1.51 @@ -243,7 +243,7 @@ 1.52 probe->schedChoiceWasRecorded = TRUE; 1.53 probe->coreNum = animatingPr->coreAnimatedBy; 1.54 probe->procrID = animatingPr->procrID; 1.55 - probe->procrCreateSecs = 0; 1.56 + probe->procrCreateSecs = animatingPr->createPtInSecs; 1.57 } 1.58 1.59 /*Everything is local to the animating procr, so no need for request, do
