comparison VMS.h @ 47:72373405c816

Adding TSC normalization -- still in progress, not working
author Me
date Sat, 16 Oct 2010 04:11:15 -0700
parents 5388f1c2da6f
children 054006c26b92
comparison
equal deleted inserted replaced
16:e6c9287eeb6c 17:8b725af1320a
5 * Author: seanhalle@yahoo.com 5 * Author: seanhalle@yahoo.com
6 * 6 *
7 */ 7 */
8 8
9 #ifndef _VMS_H 9 #ifndef _VMS_H
10 #define _VMS_H 10 #define _VMS_H
11 #define __USE_GNU 11 #define __USE_GNU
12 12
13 #include "VMS_primitive_data_types.h" 13 #include "VMS_primitive_data_types.h"
14 #include "Queue_impl/BlockingQueue.h" 14 #include "Queue_impl/BlockingQueue.h"
15 #include "Histogram/Histogram.h" 15 #include "Histogram/Histogram.h"
54 54
55 #define NUM_PREPEND_BYTES sizeof(FreeListElem) + sizeof(ownerElem); 55 #define NUM_PREPEND_BYTES sizeof(FreeListElem) + sizeof(ownerElem);
56 56
57 #define SUCCESS 0 57 #define SUCCESS 0
58 58
59 #define writeVMSQ writeCASQ 59 #define writeVMSQ writeSRSWQ
60 #define readVMSQ readCASQ 60 #define readVMSQ readSRSWQ
61 #define makeVMSQ makeCASQ 61 #define makeVMSQ makeSRSWQ
62 #define VMSQueueStruc CASQueueStruc 62 #define VMSQueueStruc SRSWQueueStruc
63 63
64 //#define thdAttrs NULL //For PThreads 64 //#define thdAttrs NULL //For PThreads
65 65
66 typedef struct _SchedSlot SchedSlot; 66 typedef struct _SchedSlot SchedSlot;
67 typedef struct _VMSReqst VMSReqst; 67 typedef struct _VMSReqst VMSReqst;
144 { 144 {
145 SlaveScheduler slaveScheduler; 145 SlaveScheduler slaveScheduler;
146 RequestHandler requestHandler; 146 RequestHandler requestHandler;
147 147
148 SchedSlot ***allSchedSlots; 148 SchedSlot ***allSchedSlots;
149 SRSWQueueStruc **readyToAnimateQs; 149 VMSQueueStruc **readyToAnimateQs;
150 VirtProcr **masterVPs; 150 VirtProcr **masterVPs;
151 151
152 void *semanticEnv; 152 void *semanticEnv;
153 void *OSEventStruc; //for future, when add I/O to BLIS 153 void *OSEventStruc; //for future, when add I/O to BLIS
154 154
177 pthread_mutex_t suspendLock; 177 pthread_mutex_t suspendLock;
178 pthread_cond_t suspend_cond; 178 pthread_cond_t suspend_cond;
179 179
180 volatile MasterEnv *_VMSMasterEnv; 180 volatile MasterEnv *_VMSMasterEnv;
181 181
182
182 //========================== 183 //==========================
183 void 184 void
184 VMS__init(); 185 VMS__init();
185 186
186 void 187 void
241 void 242 void
242 VMS__handle_dissipate_reqst( VirtProcr *procrToDissipate ); 243 VMS__handle_dissipate_reqst( VirtProcr *procrToDissipate );
243 244
244 void 245 void
245 VMS__cleanup_after_shutdown(); 246 VMS__cleanup_after_shutdown();
247
248 //==========================
249 void
250 measureTSCOffsetsAsCore0();
251
252 void
253 measureTSCOffsetsAsRemoteCore( int coreIdx );
246 254
247 //============================= Statistics ================================== 255 //============================= Statistics ==================================
248 256
249 typedef unsigned long long TSCount; 257 typedef unsigned long long TSCount;
250 258
267 /* outputs */ : "=m" (low) \ 275 /* outputs */ : "=m" (low) \
268 /* inputs */ : \ 276 /* inputs */ : \
269 /* clobber */ : "%eax", "%edx" \ 277 /* clobber */ : "%eax", "%edx" \
270 ); 278 );
271 279
272 inline TSCount getTSCount(); 280 inline TSCount getTSC();
281
282 inline TSCount getTSC();
273 283
274 //===================== Debug ========================== 284 //===================== Debug ==========================
275 int numProcrsCreated; 285 int numProcrsCreated;
276 286
277 287
288 int *pongNums;
289 TSCount *pongTimes;
290 TSCount *pingTimes;
291
278 #endif /* _VMS_H */ 292 #endif /* _VMS_H */
279 293