4 * Created on: Nov 24, 2009
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 static long long int counter = 0; /* to uniquely identify simix actions */
19 void TRACE_smx_action_execute (smx_action_t act)
21 if (!IS_TRACING) return;
23 act->counter = counter++;
24 char *category = __TRACE_current_category_get (SIMIX_process_self());
26 act->category = xbt_new (char, strlen (category)+1);
27 strncpy (act->category, category, strlen(category)+1);
31 void TRACE_smx_action_communicate (smx_action_t act, smx_process_t proc)
33 if (!IS_TRACING) return;
35 act->counter = counter++;
36 char *category = __TRACE_current_category_get (proc);
38 act->category = xbt_new (char, strlen (category)+1);
39 strncpy (act->category, category, strlen(category)+1);
43 void TRACE_smx_action_destroy (smx_action_t act)
45 if (!IS_TRACING || !IS_TRACED(act)) return;
48 xbt_free (act->category);