# HG changeset patch # User Nina Engelhardt # Date 1331915624 -3600 # Node ID 5bb234f93cf6b77b1d33e0f186a95e3928ee14db # Parent 125f0f90a0d3b2cb640a605786740512932c50be fix master unlock diff -r 125f0f90a0d3 -r 5bb234f93cf6 Defines/VMS_defs__HW_constants.h --- a/Defines/VMS_defs__HW_constants.h Thu Mar 15 18:28:29 2012 +0100 +++ b/Defines/VMS_defs__HW_constants.h Fri Mar 16 17:33:44 2012 +0100 @@ -18,7 +18,7 @@ // tradeoff amortizing master fixed overhead vs imbalance potential // when work-stealing, can make bigger, at risk of losing cache affinity -#define NUM_SCHED_SLOTS 3 +#define NUM_SCHED_SLOTS 1 //These are for backoff inside core-loop, which reduces lock contention #define NUM_REPS_W_NO_WORK_BEFORE_YIELD 10 diff -r 125f0f90a0d3 -r 5bb234f93cf6 Defines/VMS_defs__turn_on_and_off.h --- a/Defines/VMS_defs__turn_on_and_off.h Thu Mar 15 18:28:29 2012 +0100 +++ b/Defines/VMS_defs__turn_on_and_off.h Fri Mar 16 17:33:44 2012 +0100 @@ -21,7 +21,7 @@ /*turns on the probe-instrumentation in the application -- when not * defined, the calls to the probe functions turn into comments */ -#define DEBUG__TURN_ON_DEBUG_PRINT +//#define DEBUG__TURN_ON_DEBUG_PRINT /*These defines turn types of bug messages on and off */ diff -r 125f0f90a0d3 -r 5bb234f93cf6 Hardware_Dependent/VMS__HW_measurement.h --- a/Hardware_Dependent/VMS__HW_measurement.h Thu Mar 15 18:28:29 2012 +0100 +++ b/Hardware_Dependent/VMS__HW_measurement.h Fri Mar 16 17:33:44 2012 +0100 @@ -44,6 +44,6 @@ // different cores. //#define NUM_TSC_ROUND_TRIPS 10 - +void setup_perf_counters(); #endif /* */ diff -r 125f0f90a0d3 -r 5bb234f93cf6 Hardware_Dependent/VMS__primitives_asm.s --- a/Hardware_Dependent/VMS__primitives_asm.s Thu Mar 15 18:28:29 2012 +0100 +++ b/Hardware_Dependent/VMS__primitives_asm.s Fri Mar 16 17:33:44 2012 +0100 @@ -100,7 +100,7 @@ movq $_VMSMasterEnv, %rcx movq (%rcx), %rcx #_VMSMasterEnv is pointer to struct movq 0x00(%rcx), %rax #get CoreCtlr return pt - movl $0x0 , 0x08(%rcx) #release lock + movl $0x0 , 0x100(%rcx) #release lock jmp *%rax #jmp to CoreCtlr MasterReturn: ret diff -r 125f0f90a0d3 -r 5bb234f93cf6 Services_Offered_by_VMS/Measurement_and_Stats/MEAS__macros.h --- a/Services_Offered_by_VMS/Measurement_and_Stats/MEAS__macros.h Thu Mar 15 18:28:29 2012 +0100 +++ b/Services_Offered_by_VMS/Measurement_and_Stats/MEAS__macros.h Fri Mar 16 17:33:44 2012 +0100 @@ -319,9 +319,23 @@ int instrs_counter_fd[NUM_CORES]; \ uint64 start_master_lock[NUM_CORES][2]; \ CounterHandler counterHandler; + + #define HOLISTIC__Setup_Perf_Counters void setup_perf_counters(); + + #define HOLISTIC__Start_Perf_Counters prctl(PR_TASK_PERF_EVENTS_ENABLE); + + #define HOLISTIC__Record_HwResponderInvocation_start \ + uint64 cycles,instrs; \ + saveCyclesAndInstrs(animatingPr->coreAnimatedBy,cycles, instrs); \ + (*(_VMSMasterEnv->counterHandler))(HwResponderInvocation_start,animatingPr->procrID,animatingPr->numTimesScheduled,animatingPr,cycles,instrs); + + + #else #define MEAS__Insert_Counter_Handler #define MEAS__Insert_Counter_Meas_Fields_into_MasterEnv + #define HOLISTIC__Setup_Perf_Counters + #define HOLISTIC__Start_Perf_Counters #endif //Experiment in two-step macros -- if doesn't work, insert each separately diff -r 125f0f90a0d3 -r 5bb234f93cf6 VMS__startup_and_shutdown.c --- a/VMS__startup_and_shutdown.c Thu Mar 15 18:28:29 2012 +0100 +++ b/VMS__startup_and_shutdown.c Fri Mar 16 17:33:44 2012 +0100 @@ -75,6 +75,7 @@ printf( "\n\n Running in SEQUENTIAL mode \n\n" ); #else create_masterEnv(); + printf("Offset of lock in masterEnv:%d\n",offsetof(MasterEnv,masterLock)); create_the_coreCtlr_OS_threads(); #endif } @@ -316,6 +317,8 @@ PROBES__Create_Probe_Bookkeeping_Vars; + HOLISTIC__Setup_Perf_Counters; + //======================================================================== }