~ubuntu-branches/ubuntu/raring/simgrid/raring

« back to all changes in this revision

Viewing changes to src/instr/instr_paje_containers.c

  • Committer: Package Import Robot
  • Author(s): Martin Quinson
  • Date: 2013-01-31 00:24:51 UTC
  • mfrom: (10.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20130131002451-krejhf7w7h24lpsc
Tags: 3.9~rc1-1
* New upstream release: the "Grasgory" release. Major changes:
  - Gras was completely removed from this version.
  - Documentation reorganization to ease browsing it.
  - New default value for the TCP_gamma parameter: 4MiB

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
  * under the terms of the license (GNU LGPL) which comes with this package. */
6
6
 
7
7
#include "instr/instr_private.h"
 
8
#include "xbt/lib.h"
 
9
#include "surf/surf.h"
 
10
#include "surf/surf_routing.h"
8
11
 
9
12
#ifdef HAVE_TRACING
10
13
 
104
107
      case INSTR_ROUTER:      snprintf (typename, INSTR_DEFAULT_STR_SIZE, "ROUTER");      break;
105
108
      case INSTR_SMPI:        snprintf (typename, INSTR_DEFAULT_STR_SIZE, "MPI");         break;
106
109
      case INSTR_MSG_PROCESS: snprintf (typename, INSTR_DEFAULT_STR_SIZE, "MSG_PROCESS"); break;
 
110
      case INSTR_MSG_VM: snprintf (typename, INSTR_DEFAULT_STR_SIZE, "MSG_VM"); break;
107
111
      case INSTR_MSG_TASK:    snprintf (typename, INSTR_DEFAULT_STR_SIZE, "MSG_TASK");    break;
108
112
      default: THROWF (tracing_error, 0, "new container kind is unknown."); break;
109
113
    }
147
151
 
148
152
container_t PJ_container_get_or_null (const char *name)
149
153
{
150
 
  if (name == NULL) return NULL;
151
 
  container_t ret = xbt_dict_get_or_null (allContainers, name);
152
 
  if (ret == NULL){
153
 
    return NULL;
154
 
  }
155
 
  return ret;
 
154
  return name ? xbt_dict_get_or_null(allContainers, name) : NULL;
156
155
}
157
156
 
158
157
container_t PJ_container_get_root ()
188
187
  TRACE_paje_dump_buffer(1);
189
188
 
190
189
  //trace my destruction
191
 
  if (!TRACE_disable_destroy()){
 
190
  if (!TRACE_disable_destroy() && container != PJ_container_get_root()){
192
191
    //do not trace the container destruction if user requests
 
192
    //or if the container is root
193
193
    new_pajeDestroyContainer(container);
194
194
  }
195
195