# HG changeset patch # User Sean Halle # Date 1379269794 25200 # Node ID f278511770cea9657272f4931022a9e3e99f600e # Parent c390d605702cfaecc0e5ca2730e2984e909a2c28 New Branch -- ML_lib -- for library version of Multi Lang -- works diff -r c390d605702c -r f278511770ce PR__structs__common.h --- a/PR__structs__common.h Sun Sep 15 07:20:10 2013 -0700 +++ b/PR__structs__common.h Sun Sep 15 11:29:54 2013 -0700 @@ -244,7 +244,7 @@ PRLangData **langDatas; //Lang saves lang-specific things in slave here PRMetaTask **metaTasks; - PRGhostInfo *ghostInfo; +// PRGhostInfo *ghostInfo; //=========== MEASUREMENT STUFF ========== MEAS__Insert_Meas_Fields_into_Slave; diff -r c390d605702c -r f278511770ce Services_offered_by_PR/MEAS__Counter_Recording.h --- a/Services_offered_by_PR/MEAS__Counter_Recording.h Sun Sep 15 07:20:10 2013 -0700 +++ b/Services_offered_by_PR/MEAS__Counter_Recording.h Sun Sep 15 11:29:54 2013 -0700 @@ -8,7 +8,7 @@ #ifndef MEAS__COUNTER_RECORDING_H #define MEAS__COUNTER_RECORDING_H -#include "PR__common_includes/PR__common_structs.h" +#include typedef struct { diff -r c390d605702c -r f278511770ce __brch__Dev_Univ --- a/__brch__Dev_Univ Sun Sep 15 07:20:10 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -This branch is for developing the multi-language capability in VMS. The idea is to define langlets, whose constructs can be freely mixed together inside application code. No need to separate into distinct modules. A single function can use constructs from all the different langlets together inside itself. - - -======== Background on branch naming ========= - -There are two kinds of branchs: ones used to develop features, and ones tuned to particular hardware. A given HW branch may combine features from several feature-branches, picking and choosing among them. - -After Feb 2012, branches are named by the scheme: - -feat____ - -HW__ - -where and follow the pattern: - - x __ - -Examples: - -feat__exp_array_malloc - -feat__rand_backoff__4x10_Intel_WestmereEx - -HW__1x4_Intel_SandyBridge - -HW__4x10_Intel_WestmereEx - -HW__1x4_AMD_mobile diff -r c390d605702c -r f278511770ce __brch__ML_lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/__brch__ML_lib Sun Sep 15 11:29:54 2013 -0700 @@ -0,0 +1,28 @@ +This branch is for developing the multi-language capability in VMS. The idea is to define langlets, whose constructs can be freely mixed together inside application code. No need to separate into distinct modules. A single function can use constructs from all the different langlets together inside itself. + + +======== Background on branch naming ========= + +There are two kinds of branchs: ones used to develop features, and ones tuned to particular hardware. A given HW branch may combine features from several feature-branches, picking and choosing among them. + +After Feb 2012, branches are named by the scheme: + +feat____ + +HW__ + +where and follow the pattern: + + x __ + +Examples: + +feat__exp_array_malloc + +feat__rand_backoff__4x10_Intel_WestmereEx + +HW__1x4_Intel_SandyBridge + +HW__4x10_Intel_WestmereEx + +HW__1x4_AMD_mobile diff -r c390d605702c -r f278511770ce langlets/PRServ__wrapper_library.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langlets/PRServ__wrapper_library.h Sun Sep 15 11:29:54 2013 -0700 @@ -0,0 +1,92 @@ +/* + * Copyright 2009 OpenSourceResearchInstitute.org + * Licensed under GNU General Public License version 2 + * + * Author: seanhalle@yahoo.com + * + */ + +#ifndef _PRServ_wrapper_library_H +#define _PRServ_wrapper_library_H + +#include + + +//=========================================================================== +typedef void (*PtrToAtomicFn ) ( void * ); //executed atomically in master + +/*WARNING: assembly hard-codes position of endInstrAddr as first field + */ +typedef struct + { + void *endInstrAddr; + int32 hasBeenStarted; + int32 hasFinished; + PrivQueueStruc *waitQ; + } +PRServSingleton; + + +//=========================================================================== + +int32 +PRServ__giveMinWorkUnitCycles( float32 percentOverhead ); + +void +PRServ__begin_primitive(); + +int32 +PRServ__end_primitive_and_give_cycles(); + +int32 +PRServ__giveIdealNumWorkUnits(); + +int32 +PRServ__give_number_of_cores_to_schedule_onto(); + +char * +PRServ___give_environment_string(); + +//======================= + +void +PRServ__end_seedVP( SlaveVP *seedSlv ); +//======================= + +inline int32 * +PRServ__create_taskID_of_size( int32 numInts, SlaveVP *animSlv ); + +//========================= +void +PRServ__taskwait(SlaveVP *animSlv); + +inline int32 * +PRServ__give_self_taskID( SlaveVP *animSlv ); + +//======================= Concurrency Stuff ====================== +void +PRServ__start_fn_singleton( int32 singletonID, SlaveVP *animSlv ); + +void +PRServ__end_fn_singleton( int32 singletonID, SlaveVP *animSlv ); + +void +PRServ__start_data_singleton( PRServSingleton **singeltonAddr, SlaveVP *animSlv ); + +void +PRServ__end_data_singleton( PRServSingleton **singletonAddr, SlaveVP *animSlv ); + +void +PRServ__animate_short_fn_in_isolation( PtrToAtomicFn ptrToFnToExecInMaster, + void *data, SlaveVP *animSlv ); + +void +PRServ__start_transaction( int32 transactionID, SlaveVP *animSlv ); + +void +PRServ__end_transaction( int32 transactionID, SlaveVP *animSlv ); + + +//=========================================================================== +#endif /* _PRServ_H */ + diff -r c390d605702c -r f278511770ce langlets/vreo_wrapper_library.h --- a/langlets/vreo_wrapper_library.h Sun Sep 15 07:20:10 2013 -0700 +++ b/langlets/vreo_wrapper_library.h Sun Sep 15 11:29:54 2013 -0700 @@ -10,51 +10,17 @@ #define _VREO_WRAPPER_H #include -//#include -//#include -//#include "Measurement/dependency.h" //uniquely identifies VSs -- should be a jenkins char-hash of "VSs" to int32 #define VReo_MAGIC_NUMBER 0000000003 //=========================================================================== -/* - //uniquely identifies VSs -- should be a jenkins char-hash of "VSs" to int32 -#define VReo_MAGIC_NUMBER 0000000003 - -#define NUM_STRUCS_IN_LANG_ENV 1000 - - //This is hardware dependent -- it's the number of cycles of scheduling - // overhead -- if a work unit is fewer than this, it is better being - // combined sequentially with other work - //This value depends on both PR overhead and VSs's plugin. At some point - // it will be derived by perf-counter measurements during init of VSs -#define MIN_WORK_UNIT_CYCLES 20000 -*/ - -//=========================================================================== -/*This header defines everything specific to the VReo semantic plug-in - */ typedef struct _VReoIsland VReoIsland; -//typedef struct _VReoLangReq VReoLangReq; -//typedef struct _VReoTaskStub VReoTaskStub; -//typedef void (*VReoTaskFnPtr ) ( void *, SlaveVP *); typedef bool32 (*VReoCheckerFn ) ( VReoIsland * ); typedef void (*VReoDoerFn ) ( VReoIsland * ); //=========================================================================== -/* -#define IS_A_VP NULL -#define IS_ENDED NULL -#define SEED_SLV NULL - -#define NO_ID NULL -#define ANY_CORE -1 -*/ - -//=========================================================================== - typedef struct { void *buffer; @@ -123,88 +89,6 @@ VReoCircuit *circuit; } VReoBirthParams; - -/*This is VReo's "lang meta task" - *See the proto-runtime wiki entry to learn about "lang meta task" - *In essence, this holds all the meta information that VReo needs about a task - */ -/* -struct _VReoTaskStub - { - VReoTaskStub *parentTaskStub; //for liveness, for the wait construct - int32 numLiveChildTasks; - int32 numLiveChildVPs; - bool32 isWaitingForChildTasksToEnd; - bool32 isWaitingForChildVPsToEnd; - bool32 isEnded; - }; -*/ - - -/*Semantic-layer-specific data sent inside a request from lib call in app - * to request handler called in AnimationMaster - */ -/* -struct _VReoLangReq - { - SlaveVP *callingVP; - - BirthFnPtr fnPtr; - void *initData; - int32 coreToAssignOnto; - int32 createSuspendedGroup; - - VReoCircuit *circuit; - VReoPort *port; - void *itemToPut; - } -*/ -/* VReoLangReq */; - - -/* -typedef struct - { - PrivQueueStruc *slaveReadyQ; //Shared (slaves not pinned) - PrivQueueStruc *taskReadyQ; //Shared (tasks not pinned) - - int32 nextCoreToGetNewSlv; - int32 primitiveStartTime; - - VReoCircuit *circuit; //used during debugging, to get access when no work - - #ifdef HOLISTIC__TURN_ON_OBSERVE_UCC - ListOfArrays* unitList; - ListOfArrays* ctlDependenciesList; - ListOfArrays* commDependenciesList; - NtoN** ntonGroups; - PrivDynArrayInfo* ntonGroupsInfo; - ListOfArrays* dynDependenciesList; - Unit last_in_slot[NUM_CORES * NUM_ANIM_SLOTS]; - ListOfArrays* hwArcs; - #endif - - #ifdef HOLISTIC__TURN_ON_PERF_COUNTERS - ListOfArrays* counterList[NUM_CORES]; - #endif - } -VReoLangEnv; - - -typedef struct - { - VReoCircuit *circuit; - int32 numPorts; - int32 *ports; - } -VReoVPParams; - -typedef struct - { - VReoVPParams *params; //keep here, so can free when end VP - } -VReoLangData; -*/ //=========================================================================== @@ -236,29 +120,6 @@ void VReo__end_VP( SlaveVP *VPToEnd ); - -//======================= - - -//========================= Internal use only ============================= -/* -bool32 -VReo__assign_work_to_slot( void *_langEnv, AnimSlot *slot ); - -SlaveVP * -VReo__create_slave_with_affinity( BirthFnPtr fnPtr, void *initData, - SlaveVP *creatingSlv, int32 coreToAssignOnto); - -void -VReo__cleanup_after_shutdown(); - -//===================== ===================== - -#include "VReo_Request_Handlers.h" - -//===================== Measurement of Lang Overheads ===================== -#include "Measurement/VReo_Measurement.h" -*/ //=========================================================================== #endif /* _VReo_H */