From: suter Date: Wed, 10 Nov 2010 08:46:17 +0000 (+0000) Subject: change timed trace output from DEBUG to VERB to distinguish a X-Git-Tag: v3_5~310 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ab7832b0c07c62e8337dde2b452ab79f94ecf63f change timed trace output from DEBUG to VERB to distinguish a sometimes desired output (all the actions with their execution time) from true debug information git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8517 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/examples/msg/actions/actions.c b/examples/msg/actions/actions.c index 5ab23f0759..0edf514bab 100644 --- a/examples/msg/actions/actions.c +++ b/examples/msg/actions/actions.c @@ -45,14 +45,14 @@ static void action_send(xbt_dynar_t action) xbt_dynar_get_as(action, 2, char *)); // char *to = xbt_dynar_get_as(action, 2, char *); - if (XBT_LOG_ISENABLED(actions, xbt_log_priority_debug)) + if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) name = xbt_str_join(action, " "); DEBUG2("Entering Send: %s (size: %lg)", name, parse_double(size)); MSG_task_send(MSG_task_create(name, 0, parse_double(size), NULL), to); - DEBUG2("%s %f", name, MSG_get_clock() - clock); + VERB2("%s %f", name, MSG_get_clock() - clock); - if (XBT_LOG_ISENABLED(actions, xbt_log_priority_debug)) + if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) free(name); } @@ -91,7 +91,7 @@ static void Isend(xbt_dynar_t action) comm_helper = MSG_process_create_with_arguments(spawn_name, spawned_send, NULL, MSG_host_self(), 2, myargv); - DEBUG2("%s %f", xbt_str_join(action, " "), MSG_get_clock() - clock); + VERB2("%s %f", xbt_str_join(action, " "), MSG_get_clock() - clock); } @@ -106,7 +106,7 @@ static void action_recv(xbt_dynar_t action) sprintf(mailbox_name, "%s_%s", xbt_dynar_get_as(action, 2, char *), MSG_process_get_name(MSG_process_self())); - if (XBT_LOG_ISENABLED(actions, xbt_log_priority_debug)) + if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) name = xbt_str_join(action, " "); DEBUG1("Receiving: %s", name); @@ -115,7 +115,7 @@ static void action_recv(xbt_dynar_t action) DEBUG2("%s %f", name, MSG_get_clock() - clock); MSG_task_destroy(task); - if (XBT_LOG_ISENABLED(actions, xbt_log_priority_debug)) + if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) free(name); } @@ -155,7 +155,7 @@ static void Irecv(xbt_dynar_t action) NULL, MSG_host_self(), 1, myargv); - DEBUG2("%s %f", xbt_str_join(action, " "), MSG_get_clock() - clock); + VERB2("%s %f", xbt_str_join(action, " "), MSG_get_clock() - clock); free(name); } @@ -168,7 +168,7 @@ static void action_wait(xbt_dynar_t action) m_task_t task = NULL; double clock = MSG_get_clock(); - if (XBT_LOG_ISENABLED(actions, xbt_log_priority_debug)) + if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) name = xbt_str_join(action, " "); DEBUG1("Entering %s", name); @@ -176,8 +176,8 @@ static void action_wait(xbt_dynar_t action) DEBUG1("wait: %s", task_name); MSG_task_receive(&task, task_name); MSG_task_destroy(task); - DEBUG2("%s %f", name, MSG_get_clock() - clock); - if (XBT_LOG_ISENABLED(actions, xbt_log_priority_debug)) + VERB2("%s %f", name, MSG_get_clock() - clock); + if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) free(name); } @@ -187,7 +187,7 @@ static void barrier(xbt_dynar_t action) { char *name = NULL; - if (XBT_LOG_ISENABLED(actions, xbt_log_priority_debug)) + if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) name = xbt_str_join(action, " "); DEBUG1("Entering barrier: %s", name); @@ -204,7 +204,7 @@ static void barrier(xbt_dynar_t action) DEBUG1("Exiting barrier: %s", name); - if (XBT_LOG_ISENABLED(actions, xbt_log_priority_debug)) + if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) free(name); } @@ -276,7 +276,7 @@ static void reduce(xbt_dynar_t action) } MSG_process_set_data(MSG_process_self(), (void *) counters); - DEBUG2("%s %f", xbt_str_join(action, " "), MSG_get_clock() - clock); + VERB2("%s %f", xbt_str_join(action, " "), MSG_get_clock() - clock); free(name); } @@ -341,7 +341,7 @@ static void bcast(xbt_dynar_t action) } MSG_process_set_data(MSG_process_self(), (void *) counters); - DEBUG2("%s %f", xbt_str_join(action, " "), MSG_get_clock() - clock); + VERB2("%s %f", xbt_str_join(action, " "), MSG_get_clock() - clock); free(name); } @@ -352,14 +352,14 @@ static void action_sleep(xbt_dynar_t action) char *duration = xbt_dynar_get_as(action, 2, char *); double clock = MSG_get_clock(); - if (XBT_LOG_ISENABLED(actions, xbt_log_priority_debug)) + if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) name = xbt_str_join(action, " "); DEBUG1("Entering %s", name); MSG_process_sleep(parse_double(duration)); - DEBUG2("%s %f ", name, MSG_get_clock() - clock); + VERB2("%s %f ", name, MSG_get_clock() - clock); - if (XBT_LOG_ISENABLED(actions, xbt_log_priority_debug)) + if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) free(name); } @@ -463,7 +463,7 @@ static void allReduce(xbt_dynar_t action) } MSG_process_set_data(MSG_process_self(), (void *) counters); - DEBUG2("%s %f", xbt_str_join(action, " "), MSG_get_clock() - clock); + VERB2("%s %f", xbt_str_join(action, " "), MSG_get_clock() - clock); free(name); } @@ -480,13 +480,13 @@ static void compute(xbt_dynar_t action) m_task_t task = MSG_task_create(name, parse_double(amout), 0, NULL); double clock = MSG_get_clock(); - if (XBT_LOG_ISENABLED(actions, xbt_log_priority_debug)) + if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) name = xbt_str_join(action, " "); DEBUG1("Entering %s", name); MSG_task_execute(task); MSG_task_destroy(task); - DEBUG2("%s %f", name, MSG_get_clock() - clock); - if (XBT_LOG_ISENABLED(actions, xbt_log_priority_debug)) + VERB2("%s %f", name, MSG_get_clock() - clock); + if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) free(name); }