diff --git a/communication_techniques/lancement.sh b/communication_techniques/lancement.sh index 8dbcfd5..1703794 100755 --- a/communication_techniques/lancement.sh +++ b/communication_techniques/lancement.sh @@ -12,7 +12,7 @@ binList="$(ls -1 "${binDir}"| sed '$!s/$/ /' | tr -d '\n')" nbProdList="1" # Nombre de cores producteurs typeProdList="none matrice useless_loop" # Methode pour produire les valeurs typeCacheList="L2 Memory" # Niveau de cache partage -perfOpt="stat -e cycles -e L1-dcache-loads -e L1-dcache-stores -e LLC-load-misses -e LLC-store-misses" +perfOpt="stat -r 10 -e cycles -e L1-dcache-loads -e L1-dcache-stores -e LLC-load-misses -e LLC-store-misses" # Const nbIter="5000000" # Nb de lignes produites diff --git a/communication_techniques/parsing.sh b/communication_techniques/parsing.sh index 320a12e..54e0487 100755 --- a/communication_techniques/parsing.sh +++ b/communication_techniques/parsing.sh @@ -418,6 +418,7 @@ main() metriquePattern="[[:digit:]]+ +cycles " ylabel="Nb cycles" ;; total_time) + metriquePattern="[[:digit:]]+ +seconds time elapsed " metriquePattern="total_time: [[:digit:].]+" ylabel="Secondes" ;; *) diff --git a/communication_techniques/src/main.c b/communication_techniques/src/main.c index 98827d7..b6bea0e 100644 --- a/communication_techniques/src/main.c +++ b/communication_techniques/src/main.c @@ -240,7 +240,6 @@ int analyse_options(int argc, char *argv[]) void *producer(void *channel) { int i, j; - struct timeval tv1, tv2, tv_result; if (init_producer_thread(channel)) { @@ -280,24 +279,11 @@ void *producer(void *channel) fprintf(stderr, "Initialization of calculation has failed\n"); return &page_size; /* &page_size can't be NULL, whatever NULL is bound to */ } - gettimeofday(&tv1, NULL); for(i = 0; i < nb_bufs_sent; i++) { //printf("[%p] Send %d new CACHE_LINE\n", (void *) pthread_self(), BUF_SIZE / CACHE_LINE_SIZE); for(j = 0; j < WORDS_PER_BUF; j++) send(do_calc()); } - //print_results(WORDS_PER_BUF, nb_bufs_sent); - gettimeofday(&tv2, NULL); - tv_result.tv_sec = tv2.tv_sec - tv1.tv_sec; - if (tv2.tv_usec < tv1.tv_usec) - { - tv_result.tv_usec = tv1.tv_usec - tv2.tv_usec; - tv_result.tv_sec--; - } - else - tv_result.tv_usec = tv2.tv_usec - tv1.tv_usec; - printf("total_time: %u.%06u\n", (unsigned) tv_result.tv_sec, - (unsigned) tv_result.tv_usec); if (end_calc()) { fprintf(stderr, "uninitialization of calculation has failed\n");