1 /* Copyright (c) 2010. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
8 #include "instr/private.h"
12 #define OPT_TRACING_SMPI "tracing/smpi"
13 #define OPT_TRACING_PLATFORM "tracing/platform"
14 #define OPT_TRACING_MSG_TASK "tracing/msg/task"
15 #define OPT_TRACING_MSG_PROCESS "tracing/msg/process"
16 #define OPT_TRACING_MSG_VOLUME "tracing/msg/volume"
17 #define OPT_TRACING_FILENAME "tracing/filename"
19 int _TRACE_smpi_enabled (void)
21 return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI);
24 int _TRACE_platform_enabled (void)
26 return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_PLATFORM);
29 int _TRACE_msg_task_enabled (void)
31 return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_TASK);
34 int _TRACE_msg_process_enabled (void)
36 return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_PROCESS);
39 int _TRACE_msg_volume_enabled (void)
41 return xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_VOLUME);
44 char *_TRACE_filename (void)
46 return xbt_cfg_get_string (_surf_cfg_set, OPT_TRACING_FILENAME);
49 void TRACE_global_init(int *argc, char **argv)
51 /* name of the tracefile */
52 char *default_tracing_filename = xbt_strdup("simgrid.trace");
53 xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_FILENAME,
54 "Trace file created by the instrumented SimGrid.",
55 xbt_cfgelm_string, &default_tracing_filename, 1, 1,
59 int default_tracing_smpi = 0;
60 xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_SMPI,
61 "Tracing of the SMPI interface.",
62 xbt_cfgelm_int, &default_tracing_smpi, 0, 1,
66 int default_tracing_platform = 0;
67 xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_PLATFORM,
68 "Tracing of categorized platform (host and link) utilization.",
69 xbt_cfgelm_int, &default_tracing_platform, 0, 1,
73 int default_tracing_msg_task = 0;
74 xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_MSG_TASK,
75 "Tracing of MSG task behavior.",
76 xbt_cfgelm_int, &default_tracing_msg_task, 0, 1,
80 int default_tracing_msg_process = 0;
81 xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_MSG_PROCESS,
82 "Tracing of MSG process behavior.",
83 xbt_cfgelm_int, &default_tracing_msg_process, 0, 1,
86 /* msg volume (experimental) */
87 int default_tracing_msg_volume = 0;
88 xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_MSG_VOLUME,
89 "Tracing of MSG communication volume (experimental).",
90 xbt_cfgelm_int, &default_tracing_msg_volume, 0, 1,