4 * Created on: April 23, 2010
5 * Author: Lucas Schnorr
6 * License: This program is free software; you can redistribute
7 * it and/or modify it under the terms of the license
8 * (GNU LGPL) which comes with this package.
10 * Copyright (c) 2009 The SimGrid team.
13 #include "instr/private.h"
17 void __TRACE_msg_volume_start (m_task_t task)
19 if (!IS_TRACING_VOLUME) return;
21 /* check if task is traced */
22 if (!IS_TRACED(task)) return;
24 /* check if process is traced */
25 m_process_t process = MSG_process_self ();
26 if (!IS_TRACED(process)) return;
28 char process_name[200], process_alias[200];
29 m_host_t host = MSG_process_get_host (process);
30 TRACE_process_container (process, process_name, 200);
31 TRACE_process_alias_container (process, host, process_alias, 200);
33 TRACE_task_container (task, task_name, 200);
35 double volume = MSG_task_get_data_size (task);
37 pajeStartLinkWithVolume (MSG_get_clock(), "volume", "0", task->category, process_alias, task_name, volume);
40 void __TRACE_msg_volume_finish (m_task_t task)
42 if (!IS_TRACING_VOLUME) return;
44 /* check if task is traced */
45 if (!IS_TRACED(task)) return;
47 /* check if process is traced */
48 m_process_t process = MSG_process_self ();
49 if (!IS_TRACED(process)) return;
51 char process_name[200], process_alias[200];
52 m_host_t host = MSG_process_get_host (process);
53 TRACE_process_container (process, process_name, 200);
54 TRACE_process_alias_container (process, host, process_alias, 200);
56 TRACE_task_container (task, task_name, 200);
58 pajeEndLink (MSG_get_clock(), "volume", "0", task->category, process_alias, task_name);