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"
14 #include "instr/config.h"
18 static long long int counter = 0; /* to uniquely identify simix actions */
20 void TRACE_smx_action_execute (smx_action_t act)
22 if (!IS_TRACING) return;
24 act->counter = counter++;
25 char *category = __TRACE_current_category_get (SIMIX_process_self());
27 act->category = xbt_new (char, strlen (category)+1);
28 strncpy (act->category, category, strlen(category)+1);
32 void TRACE_smx_action_communicate (smx_action_t act, smx_process_t proc)
34 if (!IS_TRACING) return;
36 act->counter = counter++;
37 char *category = __TRACE_current_category_get (proc);
39 act->category = xbt_new (char, strlen (category)+1);
40 strncpy (act->category, category, strlen(category)+1);
44 void TRACE_smx_action_destroy (smx_action_t act)
46 if (!IS_TRACING || !IS_TRACED(act)) return;
49 xbt_free (act->category);