pajeDefineEventType("source", "LINK", "source");
pajeDefineEventType("destination", "LINK", "destination");
- if (IS_TRACING_PLATFORM) {
+ if (TRACE_platform_is_enabled()) {
if (TRACE_uncategorized()){
pajeDefineVariableType("power_used", "HOST", "power_used");
pajeDefineVariableType("bandwidth_used", "LINK", "bandwidth_used");
}
}
- if (IS_TRACING_PROCESSES || IS_TRACING_VOLUME) {
+ if (TRACE_msg_process_is_enabled() || TRACE_msg_volume_is_enabled()) {
//processes grouped by host
pajeDefineContainerType("PROCESS", "HOST", "PROCESS");
}
- if (IS_TRACING_PROCESSES) {
+ if (TRACE_msg_process_is_enabled()) {
pajeDefineStateType("category", "PROCESS", "category");
pajeDefineStateType("presence", "PROCESS", "presence");
}
- if (IS_TRACING_VOLUME) {
+ if (TRACE_msg_volume_is_enabled()) {
pajeDefineLinkType("volume", "0", "PROCESS", "PROCESS", "volume");
}
- if (IS_TRACING_TASKS) {
+ if (TRACE_msg_task_is_enabled()) {
//tasks grouped by host
pajeDefineContainerType("TASK", "HOST", "TASK");
pajeDefineStateType("category", "TASK", "category");
pajeDefineStateType("presence", "TASK", "presence");
}
- if (IS_TRACING_SMPI) {
+ if (TRACE_smpi_is_enabled()) {
if (TRACE_smpi_is_grouped()){
pajeDefineContainerType("MPI_PROCESS", "HOST", "MPI_PROCESS");
}else{
pajeDefineContainerType(type, parent_type, type);
if (final) {
//for m_process_t
- if (IS_TRACING_PROCESSES)
+ if (TRACE_msg_process_is_enabled())
pajeDefineContainerType("process", type, "process");
- if (IS_TRACING_PROCESSES)
+ if (TRACE_msg_process_is_enabled())
pajeDefineStateType("process-state", "process", "process-state");
- if (IS_TRACING_TASKS)
+ if (TRACE_msg_task_is_enabled())
pajeDefineContainerType("task", type, "task");
- if (IS_TRACING_TASKS)
+ if (TRACE_msg_task_is_enabled())
pajeDefineStateType("task-state", "task", "task-state");
}
val_one = xbt_strdup("1");
/* for registering application categories on top of platform */
snprintf(state, 100, "b%s", category);
- if (IS_TRACING_PLATFORM)
+ if (TRACE_platform_is_enabled())
pajeDefineVariableTypeWithColor(state, "LINK", state, final_color);
snprintf(state, 100, "p%s", category);
- if (IS_TRACING_PLATFORM)
+ if (TRACE_platform_is_enabled())
pajeDefineVariableTypeWithColor(state, "HOST", state, final_color);
val_one = xbt_strdup("1");
{
char name[200], alias[200];
m_host_t host = NULL;
- if (!(IS_TRACING_PROCESSES || IS_TRACING_VOLUME))
+ if (!(TRACE_msg_process_is_enabled() || TRACE_msg_volume_is_enabled()))
return;
host = MSG_process_get_host(process);
if (!xbt_dict_get_or_null(process_containers, alias)) {
pajeCreateContainer(MSG_get_clock(), alias, "PROCESS",
MSG_host_get_name(host), name);
- if (IS_TRACING_PROCESSES)
+ if (TRACE_msg_process_is_enabled())
pajeSetState(MSG_get_clock(), "category", alias, process->category);
xbt_dict_set(process_containers, xbt_strdup(alias), xbt_strdup("1"),
xbt_free);
{
char alias[200];
m_host_t host = NULL;
- if (!IS_TRACING_PROCESSES)
+ if (!TRACE_msg_process_is_enabled())
return;
//updating presence state of this process location
//create container of type "process" to indicate behavior
TRACE_process_container(process, name, 200);
- if (IS_TRACING_PROCESSES)
+ if (TRACE_msg_process_is_enabled())
pajeCreateContainer(MSG_get_clock(), name, "process", category, name);
- if (IS_TRACING_PROCESSES)
+ if (TRACE_msg_process_is_enabled())
pajeSetState(MSG_get_clock(), "process-state", name, "executing");
}
m_host_t new_host)
{
char alias[200];
- if (!(IS_TRACING_PROCESSES || IS_TRACING_VOLUME) || !IS_TRACED(process))
+ if (!(TRACE_msg_process_is_enabled() || TRACE_msg_volume_is_enabled()) || !IS_TRACED(process))
return;
//disabling presence in old_host (__TRACE_msg_process_not_present)
TRACE_process_alias_container(process, old_host, alias, 200);
- if (IS_TRACING_PROCESSES)
+ if (TRACE_msg_process_is_enabled())
pajePopState(MSG_get_clock(), "presence", alias);
TRACE_msg_process_location(process);
void TRACE_msg_process_kill(m_process_t process)
{
char name[200];
- if (!IS_TRACING_PROCESSES || !IS_TRACED(process))
+ if (!TRACE_msg_process_is_enabled() || !IS_TRACED(process))
return;
TRACE_process_container(process, name, 200);
void TRACE_msg_process_suspend(m_process_t process)
{
char name[200];
- if (!IS_TRACING_PROCESSES || !IS_TRACED(process))
+ if (!TRACE_msg_process_is_enabled() || !IS_TRACED(process))
return;
TRACE_process_container(process, name, 200);
void TRACE_msg_process_resume(m_process_t process)
{
char name[200];
- if (!IS_TRACING_PROCESSES || !IS_TRACED(process))
+ if (!TRACE_msg_process_is_enabled() || !IS_TRACED(process))
return;
TRACE_process_container(process, name, 200);
void TRACE_msg_process_sleep_in(m_process_t process)
{
char name[200];
- if (!IS_TRACING_PROCESSES || !IS_TRACED(process))
+ if (!TRACE_msg_process_is_enabled() || !IS_TRACED(process))
return;
TRACE_process_container(process, name, 200);
void TRACE_msg_process_sleep_out(m_process_t process)
{
char name[200];
- if (!IS_TRACING_PROCESSES || !IS_TRACED(process))
+ if (!TRACE_msg_process_is_enabled() || !IS_TRACED(process))
return;
TRACE_process_container(process, name, 200);
host = MSG_process_get_host(process);
TRACE_process_container(process, name, 200);
TRACE_process_alias_container(process, host, alias, 200);
- if (IS_TRACING_PROCESSES)
+ if (TRACE_msg_process_is_enabled())
pajeDestroyContainer(MSG_get_clock(), "process", name);
- if (IS_TRACING_PROCESSES)
+ if (TRACE_msg_process_is_enabled())
pajeDestroyContainer(MSG_get_clock(), "PROCESS", alias);
}
char *val_one = NULL;
m_process_t process = NULL;
m_host_t host = NULL;
- if (!IS_TRACING_TASKS)
+ if (!TRACE_msg_task_is_enabled())
return;
process = MSG_process_self();
host = MSG_process_get_host(process);
char alias[200];
m_process_t process = NULL;
m_host_t host = NULL;
- if (!IS_TRACING_TASKS)
+ if (!TRACE_msg_task_is_enabled())
return;
//updating presence state of this task location
process = MSG_process_self();
char alias[200];
m_process_t process = NULL;
m_host_t host = NULL;
- if (!IS_TRACING_TASKS)
+ if (!TRACE_msg_task_is_enabled())
return;
//updating presence state of this task location
process = MSG_process_self();
TRACE_task_container(task, name, 200);
//create container of type "task" to indicate behavior
- if (IS_TRACING_TASKS)
+ if (TRACE_msg_task_is_enabled())
pajeCreateContainer(MSG_get_clock(), name, "task", category, name);
- if (IS_TRACING_TASKS)
+ if (TRACE_msg_task_is_enabled())
pajePushState(MSG_get_clock(), "task-state", name, "created");
}
return;
TRACE_task_container(task, name, 200);
- if (IS_TRACING_TASKS)
+ if (TRACE_msg_task_is_enabled())
pajePushState(MSG_get_clock(), "task-state", name, "execute");
TRACE_msg_category_set(SIMIX_process_self(), task);
return;
TRACE_task_container(task, name, 200);
- if (IS_TRACING_TASKS)
+ if (TRACE_msg_task_is_enabled())
pajePopState(MSG_get_clock(), "task-state", name);
TRACE_category_unset(SIMIX_process_self());
return;
TRACE_task_container(task, name, 200);
- if (IS_TRACING_TASKS)
+ if (TRACE_msg_task_is_enabled())
pajeDestroyContainer(MSG_get_clock(), "task", name);
//finish the location of this task
return;
TRACE_task_container(task, name, 200);
- if (IS_TRACING_TASKS)
+ if (TRACE_msg_task_is_enabled())
pajePopState(MSG_get_clock(), "task-state", name);
TRACE_msg_volume_finish(task);
return 0;
TRACE_task_container(task, name, 200);
- if (IS_TRACING_TASKS)
+ if (TRACE_msg_task_is_enabled())
pajePopState(MSG_get_clock(), "task-state", name);
- if (IS_TRACING_TASKS)
+ if (TRACE_msg_task_is_enabled())
pajePushState(MSG_get_clock(), "task-state", name, "communicate");
TRACE_msg_volume_start(task);
char process_name[200], process_alias[200];
char task_name[200];
double volume = 0;
- if (!IS_TRACING_VOLUME)
+ if (!TRACE_msg_volume_is_enabled())
return;
/* check if task is traced */
char task_name[200];
m_process_t process = NULL;
m_host_t host = NULL;
- if (!IS_TRACING_VOLUME)
+ if (!TRACE_msg_volume_is_enabled())
return;
/* check if task is traced */
#ifdef HAVE_TRACING
#define IS_TRACED(n) (n->category)
-#define IS_TRACING_TASKS (TRACE_msg_task_is_enabled())
-#define IS_TRACING_PLATFORM (TRACE_platform_is_enabled())
-#define IS_TRACING_PROCESSES (TRACE_msg_process_is_enabled())
-#define IS_TRACING_VOLUME (TRACE_msg_volume_is_enabled())
-#define IS_TRACING_SMPI (TRACE_smpi_is_enabled())
#define INSTR_DEFAULT_STR_SIZE 500
xbt_dynar_t array = xbt_dynar_new(sizeof(char *), xbt_free);
char *var_cpy = xbt_strdup(variable);
xbt_dynar_push(array, &var_cpy);
- if (IS_TRACING_PLATFORM)
+ if (TRACE_platform_is_enabled())
pajeSetVariable(now, variable, resource, "0");
xbt_dict_set(platform_variables, resource, array,
xbt_dynar_free_voidp);
if (flag == 0) {
char *var_cpy = xbt_strdup(variable);
xbt_dynar_push(array, &var_cpy);
- if (IS_TRACING_PLATFORM)
+ if (TRACE_platform_is_enabled())
pajeSetVariable(now, variable, resource, "0");
}
}
const char *variable, const char *resource,
double value)
{
- if (!IS_TRACING_PLATFORM)
+ if (!TRACE_platform_is_enabled())
return;
char valuestr[100];
static void __TRACE_B_release(void)
{
- if (!IS_TRACING_PLATFORM)
+ if (!TRACE_platform_is_enabled())
return;
char *key, *time;
const char *variable, const char *resource,
double value)
{
- if (!IS_TRACING_PLATFORM)
+ if (!TRACE_platform_is_enabled())
return;
char key_time[INSTR_DEFAULT_STR_SIZE];
void TRACE_smpi_start(void)
{
- if (IS_TRACING_SMPI) {
+ if (TRACE_smpi_is_enabled()) {
TRACE_start();
}
}
void TRACE_smpi_release(void)
{
TRACE_surf_release();
- if (IS_TRACING_SMPI) {
+ if (TRACE_smpi_is_enabled()) {
TRACE_end();
}
}
void TRACE_smpi_init(int rank)
{
- if (!IS_TRACING_SMPI)
+ if (!TRACE_smpi_is_enabled())
return;
char str[INSTR_DEFAULT_STR_SIZE];
void TRACE_smpi_finalize(int rank)
{
- if (!IS_TRACING_SMPI)
+ if (!TRACE_smpi_is_enabled())
return;
char str[INSTR_DEFAULT_STR_SIZE];
void TRACE_smpi_collective_in(int rank, int root, const char *operation)
{
- if (!IS_TRACING_SMPI)
+ if (!TRACE_smpi_is_enabled())
return;
char str[INSTR_DEFAULT_STR_SIZE];
void TRACE_smpi_collective_out(int rank, int root, const char *operation)
{
- if (!IS_TRACING_SMPI)
+ if (!TRACE_smpi_is_enabled())
return;
char str[INSTR_DEFAULT_STR_SIZE];
void TRACE_smpi_ptp_in(int rank, int src, int dst, const char *operation)
{
- if (!IS_TRACING_SMPI)
+ if (!TRACE_smpi_is_enabled())
return;
char str[INSTR_DEFAULT_STR_SIZE];
void TRACE_smpi_ptp_out(int rank, int src, int dst, const char *operation)
{
- if (!IS_TRACING_SMPI)
+ if (!TRACE_smpi_is_enabled())
return;
char str[INSTR_DEFAULT_STR_SIZE];
void TRACE_smpi_send(int rank, int src, int dst)
{
- if (!IS_TRACING_SMPI)
+ if (!TRACE_smpi_is_enabled())
return;
char key[INSTR_DEFAULT_STR_SIZE], str[INSTR_DEFAULT_STR_SIZE];
void TRACE_smpi_recv(int rank, int src, int dst)
{
- if (!IS_TRACING_SMPI)
+ if (!TRACE_smpi_is_enabled())
return;
char key[INSTR_DEFAULT_STR_SIZE], str[INSTR_DEFAULT_STR_SIZE];
double h)
{
char valuestr[100];
- if (!TRACE_is_active() || !IS_TRACING_PLATFORM)
+ if (!TRACE_is_active() || !TRACE_platform_is_enabled())
return;
snprintf(valuestr, 100, "%g", x);
{
if (!TRACE_is_active())
return;
- if (!IS_TRACING_PLATFORM)
+ if (!TRACE_platform_is_enabled())
return;
if (!category)
return;
const char *dst, const char *variable,
double value, const char *what)
{
- if (!TRACE_is_active() || !IS_TRACING_PLATFORM)
+ if (!TRACE_is_active() || !TRACE_platform_is_enabled())
return;
char valuestr[100];
double value, const char *what)
{
char valuestr[100];
- if (!TRACE_is_active() || !IS_TRACING_PLATFORM)
+ if (!TRACE_is_active() || !TRACE_platform_is_enabled())
return;
snprintf(valuestr, 100, "%g", value);