X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6ba4f911e61163825ac96b24b1e8c894a5de1a6c..8957cf5049e04e8d8b7a8183f863c7ea2977afe7:/src/instr/msg_task_instr.c diff --git a/src/instr/msg_task_instr.c b/src/instr/msg_task_instr.c index febb1b6131..10f95aba13 100644 --- a/src/instr/msg_task_instr.c +++ b/src/instr/msg_task_instr.c @@ -1,14 +1,8 @@ -/* - * msg.c - * - * Created on: Nov 24, 2009 - * Author: Lucas Schnorr - * License: This program is free software; you can redistribute - * it and/or modify it under the terms of the license - * (GNU LGPL) which comes with this package. - * - * Copyright (c) 2009 The SimGrid team. - */ +/* Copyright (c) 2010. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ #include "instr/private.h" @@ -27,7 +21,8 @@ void __TRACE_current_category_set (m_task_t task) { char processid[100]; snprintf (processid, 100, "%p", SIMIX_process_self()); - xbt_dict_set (current_task_category, processid, xbt_strdup (task->category), xbt_free); + char *var_cpy = xbt_strdup (task->category); + xbt_dict_set (current_task_category, processid, var_cpy, xbt_free); } void __TRACE_current_category_unset () @@ -60,7 +55,9 @@ void __TRACE_task_location (m_task_t task) //check if task container is already created if (!xbt_dict_get_or_null (task_containers, alias)){ pajeCreateContainer (MSG_get_clock(), alias, "TASK", container, name); - xbt_dict_set (task_containers, xbt_strdup(alias), xbt_strdup("1"), xbt_free); + pajeSetState (MSG_get_clock(), "category", alias, task->category); + char *val_one = xbt_strdup ("1"); + xbt_dict_set (task_containers, alias, val_one, xbt_free); } } @@ -172,6 +169,8 @@ void TRACE_msg_task_get_end (double start_time, m_task_t task) TRACE_task_container (task, name, 200); if (IS_TRACING_TASKS) pajePopState (MSG_get_clock(), "task-state", name); + __TRACE_msg_volume_finish (task); + __TRACE_task_location (task); __TRACE_task_location_present (task); } @@ -186,6 +185,8 @@ int TRACE_msg_task_put_start (m_task_t task) if (IS_TRACING_TASKS) pajePopState (MSG_get_clock(), "task-state", name); if (IS_TRACING_TASKS) pajePushState (MSG_get_clock(), "task-state", name, "communicate"); + __TRACE_msg_volume_start (task); + //trace task location grouped by host __TRACE_task_location_not_present (task);