Skip to content

Commit 014085b

Browse files
committed
Now an html compiling the generated images is generated.
Change-Id: I45d0b918b781f415c0f9819891eff0a9a52e27b5 Signed-off-by: panacotta <[email protected]>
1 parent b7876e5 commit 014085b

File tree

2 files changed

+7
-19
lines changed

2 files changed

+7
-19
lines changed

papiplot/.settings/language.settings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
66
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
77
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
8-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="101520255990100379" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
8+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="94275984162938619" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
99
<language-scope id="org.eclipse.cdt.core.gcc"/>
1010
<language-scope id="org.eclipse.cdt.core.g++"/>
1111
</provider>
@@ -16,7 +16,7 @@
1616
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
1717
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
1818
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
19-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="101520255990100379" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
19+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="94275984162938619" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
2020
<language-scope id="org.eclipse.cdt.core.gcc"/>
2121
<language-scope id="org.eclipse.cdt.core.g++"/>
2222
</provider>

papiplot/src/plot.c

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -318,22 +318,22 @@ void search_and_plot(char *path) {
318318

319319
while ((pDirent = readdir(pDir)) != NULL) {
320320
if(is_papioutput(pDirent->d_name)) {
321-
printf("going for %s\n", pDirent->d_name);
321+
//printf("going for %s\n", pDirent->d_name);
322322
path_to_csv = malloc(strlen(path)+strlen(pDirent->d_name)+2);
323323
strcpy(path_to_csv, path);
324324
strcat(path_to_csv,"/");
325325
strcat(path_to_csv,pDirent->d_name);
326326
data = process_data(path, path_to_csv, pDirent->d_name, path_to_totals);
327327
plot(path, data->proc_file_path, data->actor_name, data->actions_nb, data->actions[0]->events_nb);
328328
html_actor(htmlfile, data);
329-
//remove(data->proc_file_path);
329+
remove(data->proc_file_path);
330330
free(data);
331331
}
332332
}
333333
plot_overall(path, path_to_totals, actors_nb, get_events_nb(path_to_totals)+1);
334334

335335
html_close(htmlfile);
336-
//remove(path_to_totals);
336+
remove(path_to_totals);
337337

338338
fclose(htmlfile);
339339
closedir (pDir);
@@ -366,9 +366,8 @@ event_acum_for_actor* process_data (char* path_todir, char* path_tofile, char* f
366366
actor->actions_nb = actions_nb;
367367
int i, j;
368368

369-
printf("has %d actions\n", actions_nb);
370369
for(i=0;i<actions_nb*3;i++){
371-
actor->actions[i] = malloc(sizeof(event_acum_for_action)*2+sizeof(event_acumulator)*events_nb*3);
370+
actor->actions[i] = malloc(sizeof(event_acum_for_action)*2+sizeof(event_acumulator)*events_nb*3);//weird memory is weird..
372371
actor->actions[i]->events_nb = events_nb;
373372
//actor->actions[i]->action_name
374373
for(j=0;j<events_nb;j++){
@@ -412,38 +411,27 @@ event_acum_for_actor* process_data (char* path_todir, char* path_tofile, char* f
412411

413412
//acumuating structures
414413
int result; //borrar
415-
int temp = 0; //borrar
416414
while(fgets(buf,1500,ofile)!=NULL){
417415
token = strtok(buf,";");
418416
token = strtok(NULL,";");//read action name
419-
printf("%d\n", ++temp);
420417

421418
for(i=0; i<actor->actions_nb; i++){
422-
printf("continuing with %s (action %d)\n", actor->actions[i]->action_name, i);
423-
printf(" beg cos found = %d, i = %d, actions_nb = %d\n", found, i, actions_nb);
424419
if(actor->actions[i]->action_name==NULL)
425420
break;
426421
else {
427-
printf("comparing %s with %s\n", actor->actions[i]->action_name, token);
428-
printf("result = %d\n",strcmp(actor->actions[i]->action_name,token));
429422
result = strcmp(actor->actions[i]->action_name,token);
430-
printf("ea, result was %d\n", result);
431423
if(result==0){
432-
printf("action %s already exists\n", actor->actions[i]->action_name);
433424
found = i;
434425
break;
435426
}
436427
else {
437-
printf("eaea\n");
438-
printf("end? cos found = %d, i = %d, actions_nb = %d\n", found, i, actions_nb);
439428
}
440429
}
441430
}
442431
if (found == -1){
443-
printf("not found, adding action %s\n", token);
432+
//printf("not found, adding action %s\n", token);
444433
actor->actions[found_actions]->action_name = malloc(strlen(token)+1);
445434
strcpy(actor->actions[found_actions]->action_name,token);
446-
printf("%s added!\n", actor->actions[i]->action_name);
447435
}
448436

449437
current = (found == -1)? found_actions++ : found;

0 commit comments

Comments
 (0)