X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3bf26d5f8bcf8154aff251b7dca4174468e0971e..2f810149832a2d855c33d0df5b02d736c2081e41:/examples/msg/tracing/categories.c diff --git a/examples/msg/tracing/categories.c b/examples/msg/tracing/categories.c index 07d03f6218..08d4b3b42e 100644 --- a/examples/msg/tracing/categories.c +++ b/examples/msg/tracing/categories.c @@ -56,10 +56,9 @@ int master(int argc, char *argv[]) int slave(int argc, char *argv[]) { m_task_t task = NULL; - int res; while (1) { - res = MSG_task_receive(&(task), "master_mailbox"); + MSG_task_receive(&(task), "master_mailbox"); if (!strcmp(MSG_task_get_name(task), "finalize")) { MSG_task_destroy(task); @@ -83,6 +82,13 @@ MSG_error_t test_all(const char *platform_file, MSG_set_channel_number(0); MSG_create_environment(platform_file); } + { + //declaring user categories with RGB colors + TRACE_category_with_color ("compute", "1 0 0"); //red + TRACE_category_with_color ("request", "0 1 0"); //green + TRACE_category_with_color ("data", "0 0 1"); //blue + TRACE_category_with_color ("finalize", "0 0 0");//black + } { /* Application deployment */ MSG_function_register("master", master); MSG_function_register("slave", slave); @@ -90,7 +96,7 @@ MSG_error_t test_all(const char *platform_file, } res = MSG_main(); - INFO1("Simulation time %g", MSG_get_clock()); + XBT_INFO("Simulation time %g", MSG_get_clock()); return res; } @@ -107,12 +113,6 @@ int main(int argc, char *argv[]) exit(1); } - //declaring user categories - TRACE_category("compute"); - TRACE_category("request"); - TRACE_category("data"); - TRACE_category("finalize"); - res = test_all(argv[1], argv[2]); MSG_clean();