X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d54bd673caabfaf797eef66bea11c265759a8652..1a39cc6fdc908c33507b5b0f8bae61f7286fd4ca:/src/instr/msg_volume.c diff --git a/src/instr/msg_volume.c b/src/instr/msg_volume.c index eafa26a264..91a52acbe0 100644 --- a/src/instr/msg_volume.c +++ b/src/instr/msg_volume.c @@ -1,61 +1,68 @@ -/* - * msg_volume.c - * - * Created on: April 23, 2010 - * 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" #ifdef HAVE_TRACING -void __TRACE_msg_volume_start (m_task_t task) +void TRACE_msg_volume_start(m_task_t task) { - if (!IS_TRACING_VOLUME) return; + m_process_t process = NULL; + m_host_t host = NULL; + char process_name[200], process_alias[200]; + char task_name[200]; + double volume = 0; + if (!IS_TRACING_VOLUME) + return; /* check if task is traced */ - if (!IS_TRACED(task)) return; + if (!IS_TRACED(task)) + return; /* check if process is traced */ - m_process_t process = MSG_process_self (); - if (!IS_TRACED(process)) return; + process = MSG_process_self(); + if (!IS_TRACED(process)) + return; - char process_name[200], process_alias[200]; - m_host_t host = MSG_process_get_host (process); - TRACE_process_container (process, process_name, 200); - TRACE_process_alias_container (process, host, process_alias, 200); - char task_name[200]; - TRACE_task_container (task, task_name, 200); + host = MSG_process_get_host(process); + TRACE_process_container(process, process_name, 200); + TRACE_process_alias_container(process, host, process_alias, 200); + TRACE_task_container(task, task_name, 200); - double volume = MSG_task_get_data_size (task); + volume = MSG_task_get_data_size(task); - pajeStartLinkWithVolume (MSG_get_clock(), "volume", "0", task->category, process_alias, task_name, volume); + pajeStartLinkWithVolume(MSG_get_clock(), "volume", "0", task->category, + process_alias, task_name, volume); } -void __TRACE_msg_volume_finish (m_task_t task) +void TRACE_msg_volume_finish(m_task_t task) { - if (!IS_TRACING_VOLUME) return; + char process_name[200], process_alias[200]; + char task_name[200]; + m_process_t process = NULL; + m_host_t host = NULL; + if (!IS_TRACING_VOLUME) + return; /* check if task is traced */ - if (!IS_TRACED(task)) return; + if (!IS_TRACED(task)) + return; /* check if process is traced */ - m_process_t process = MSG_process_self (); - if (!IS_TRACED(process)) return; + process = MSG_process_self(); + if (!IS_TRACED(process)) + return; - char process_name[200], process_alias[200]; - m_host_t host = MSG_process_get_host (process); - TRACE_process_container (process, process_name, 200); - TRACE_process_alias_container (process, host, process_alias, 200); - char task_name[200]; - TRACE_task_container (task, task_name, 200); + host = MSG_process_get_host(process); + TRACE_process_container(process, process_name, 200); + TRACE_process_alias_container(process, host, process_alias, 200); + TRACE_task_container(task, task_name, 200); - pajeEndLink (MSG_get_clock(), "volume", "0", task->category, process_alias, task_name); + pajeEndLink(MSG_get_clock(), "volume", "0", task->category, + process_alias, task_name); } #endif