Пример #1
0
int TRACE_end()
{
  if (!trace_active)
    return 1;

  TRACE_generate_viva_uncat_conf();
  TRACE_generate_viva_cat_conf();

  /* dump trace buffer */
  TRACE_last_timestamp_to_dump = surf_get_clock();
  TRACE_paje_dump_buffer(1);

  /* destroy all data structures of tracing (and free) */
  PJ_container_free_all();
  PJ_type_free_all();
  PJ_container_release();
  PJ_type_release();
  TRACE_smpi_release();
  TRACE_surf_release();
  xbt_dict_free(&user_link_variables);
  xbt_dict_free(&user_host_variables);
  xbt_dict_free(&declared_marks);
  xbt_dict_free(&created_categories);

  /* close the trace file */
  TRACE_paje_end();

  /* de-activate trace */
  trace_active = 0;
  XBT_DEBUG ("Tracing is off");
  XBT_DEBUG("Tracing system is shutdown");
  return 0;
}
Пример #2
0
/** \ingroup msg_simulation
 * \brief Clean the MSG simulation
 */
MSG_error_t MSG_clean(void)
{

#ifdef HAVE_TRACING
  TRACE_surf_release();
#endif

  MSG_process_killall(0);

  free(msg_global);
  msg_global = NULL;

  /* initialization of the action module */
  _MSG_action_exit();

#ifdef HAVE_TRACING
  TRACE_end();
#endif

  SIMIX_clean();

  // Exit the LIB host_lib
  xbt_lib_free(&host_lib);
  xbt_lib_free(&link_lib);
  xbt_lib_free(&as_router_lib);

  return MSG_OK;
}