static bool trace_configured = false;
static bool trace_active = false;
-instr_fmt_type_t instr_fmt_type = instr_fmt_paje;
+simgrid::instr::TraceFormat simgrid::instr::trace_format = simgrid::instr::TraceFormat::Paje;
static void TRACE_getopts()
{
if (format == "Paje") {
TRACE_paje_start();
} else if (format == "TI") {
- instr_fmt_type = instr_fmt_TI;
+ simgrid::instr::trace_format = simgrid::instr::TraceFormat::Ti;
TRACE_TI_start();
}else{
xbt_die("Unknown trace format :%s ", format.c_str());
xbt_cfg_register_int(OPT_TRACING_PRECISION, 6, nullptr, "Numerical precision used when timestamping events "
"(expressed in number of digits after decimal point)");
- xbt_cfg_register_alias(OPT_TRACING_COMMENT_FILE,"tracing/comment_file");
- xbt_cfg_register_alias(OPT_TRACING_DISABLE_DESTROY, "tracing/disable_destroy");
- xbt_cfg_register_alias(OPT_TRACING_DISABLE_LINK, "tracing/disable_link");
- xbt_cfg_register_alias(OPT_TRACING_DISABLE_POWER, "tracing/disable_power");
- xbt_cfg_register_alias(OPT_TRACING_DISPLAY_SIZES, "tracing/smpi/display_sizes");
- xbt_cfg_register_alias(OPT_TRACING_FORMAT_TI_ONEFILE, "tracing/smpi/format/ti_one_file");
+ simgrid::config::alias(OPT_TRACING_COMMENT_FILE, {"tracing/comment_file"});
+ simgrid::config::alias(OPT_TRACING_DISABLE_DESTROY, {"tracing/disable_destroy"});
+ simgrid::config::alias(OPT_TRACING_DISABLE_LINK, {"tracing/disable_link"});
+ simgrid::config::alias(OPT_TRACING_DISABLE_POWER, {"tracing/disable_power"});
+ simgrid::config::alias(OPT_TRACING_DISPLAY_SIZES, {"tracing/smpi/display_sizes"});
+ simgrid::config::alias(OPT_TRACING_FORMAT_TI_ONEFILE, {"tracing/smpi/format/ti_one_file"});
/* instrumentation can be considered configured now */
trace_configured = true;
" time consuming, since it must get the route from each host to other hosts\n"
" within the same Autonomous System (AS).", detailed);
}
-
-static void output_types (const char *name, xbt_dynar_t types, FILE *file)
-{
- unsigned int i;
- fprintf (file, " %s = (", name);
- for (i = xbt_dynar_length(types); i > 0; i--) {
- char *type = *(static_cast<char**>(xbt_dynar_get_ptr(types, i - 1)));
- fprintf (file, "\"%s\"", type);
- if (i - 1 > 0){
- fprintf (file, ",");
- }else{
- fprintf (file, ");\n");
- }
- }
- xbt_dynar_free (&types);
-}