-
-void LogContainerCreation (container_t container)
-{
- double timestamp = SIMIX_get_clock();
-
- XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, PAJE_CreateContainer,timestamp);
-
-if (instr_fmt_type == instr_fmt_paje) {
- stream << std::fixed << std::setprecision(TRACE_precision());
- stream << PAJE_CreateContainer;
- stream << " ";
- /* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */
- if (timestamp < 1e-12)
- stream << 0;
- else
- stream << timestamp;
- stream << " " << container->id << " " << container->type->id << " " << container->father->id << " \""
- << container->name << "\"";
-
- print_row();
- } else if (instr_fmt_type == instr_fmt_TI) {
- // if we are in the mode with only one file
- static FILE* ti_unique_file = nullptr;
-
- if (tracing_files == nullptr) {
- tracing_files = xbt_dict_new_homogeneous(nullptr);
- // generate unique run id with time
- prefix = xbt_os_time();
- }
-
- if (not xbt_cfg_get_boolean("tracing/smpi/format/ti-one-file") || ti_unique_file == nullptr) {
- char* folder_name = bprintf("%s_files", TRACE_get_filename());
- char* filename = bprintf("%s/%f_%s.txt", folder_name, prefix, container->name);
-#ifdef WIN32
- _mkdir(folder_name);
-#else
- mkdir(folder_name, S_IRWXU | S_IRWXG | S_IRWXO);
-#endif
- ti_unique_file = fopen(filename, "w");
- xbt_assert(ti_unique_file, "Tracefile %s could not be opened for writing: %s", filename, strerror(errno));
- fprintf(tracing_file, "%s\n", filename);
-
- xbt_free(folder_name);
- xbt_free(filename);
- }
-
- xbt_dict_set(tracing_files, container->name, (void*)ti_unique_file, nullptr);
- } else {
- THROW_IMPOSSIBLE;
- }
-}
-
-void LogContainerDestruction(container_t container)
+simgrid::instr::AddVariableEvent::AddVariableEvent(double timestamp, container_t container, simgrid::instr::Type* type,
+ double value)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_AddVariable), value(value)