Changeset: 0a6b34d177cd for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0a6b34d177cd
Modified Files:
monetdb5/extras/crackers/crackers_holistic.c
monetdb5/extras/crackers/crackers_selectholpl_ops.mx
monetdb5/mal/mal_profiler.c
Branch: holindex
Log Message:
Use a thread array for multiple threads.
diffs (60 lines):
diff --git a/monetdb5/extras/crackers/crackers_holistic.c
b/monetdb5/extras/crackers/crackers_holistic.c
--- a/monetdb5/extras/crackers/crackers_holistic.c
+++ b/monetdb5/extras/crackers/crackers_holistic.c
@@ -27,7 +27,7 @@
static FrequencyNode *_InternalFrequencyStructA = NULL;
static FrequencyNode *_InternalFrequencyStructB = NULL;
static MT_Lock frequencylock;
-//static MT_Id idletime_thread;
+static MT_Id idletime_thread[1];
MT_Lock CRKIndexLock;
pthread_rwlock_t CRKFirstPieceRWLock;
@@ -38,10 +38,12 @@ IdleFuncPtr IdleFunc;
str
CRKinitHolistic(int *ret)
{
+ int i;
IdleFunc=&CRKrandomCrack;
MT_lock_init(&frequencylock, "FrequencyStruct");
MT_lock_init(&CRKIndexLock, "Cracker Index Lock");
- //MT_create_thread(&idletime_thread,(void (*)(void *))HeartbeatCPUload,
IdleFunc, MT_THR_JOINABLE);
+ for(i=0;i<0;i++)
+ MT_create_thread(&idletime_thread[i],(void (*)(void
*))HeartbeatCPUload, IdleFunc, MT_THR_JOINABLE);
*ret = 0;
return MAL_SUCCEED;
}
diff --git a/monetdb5/extras/crackers/crackers_selectholpl_ops.mx
b/monetdb5/extras/crackers/crackers_selectholpl_ops.mx
--- a/monetdb5/extras/crackers/crackers_selectholpl_ops.mx
+++ b/monetdb5/extras/crackers/crackers_selectholpl_ops.mx
@@ -315,7 +315,7 @@ createView:
int countBatElements=0;
int L1=0; /*Number of elements that can fit into L1 cache (size:
32KB)*/
FILE *ofp;
- char outputFilename1[] =
"/export/scratch2/petraki/experiments_paper1/thresholds/client1/waiting001/cpuload40/breakdown.txt";
+ char outputFilename1[] =
"/export/scratch2/petraki/experiments_paper1/thresholds/client1/waiting0/cpuload80/select/thread7/breakdown.txt";
FrequencyNode* FN;
FrequencyNode *FrequencyStructA = getFrequencyStruct('A');
diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c
--- a/monetdb5/mal/mal_profiler.c
+++ b/monetdb5/mal/mal_profiler.c
@@ -1328,14 +1328,10 @@ void HeartbeatCPUload(str (*IdleFunc)(in
(void) getCPULoad(cpuload);
if (corestat[256].load < 80)
{
- MT_sleep_ms(0.01);
- (void) getCPULoad(cpuload);
- if (corestat[256].load < 80)
- {
-
fprintf(stderr,"cpuload=%lf\n",corestat[256].load);
- IdleFunc(NULL);
- }
- }
+ fprintf(stderr,"cpuload=%lf\n",corestat[256].load);
+ IdleFunc(NULL);
+ }
+ MT_sleep_ms(10);
//fprintf(stderr,"%s\n",cpuload);
}
}
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list