A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use signals on PajeEvent creation/destruction
[simgrid.git]
/
src
/
instr
/
instr_paje_containers.cpp
diff --git
a/src/instr/instr_paje_containers.cpp
b/src/instr/instr_paje_containers.cpp
index
0680d8c
..
941f2de
100644
(file)
--- a/
src/instr/instr_paje_containers.cpp
+++ b/
src/instr/instr_paje_containers.cpp
@@
-13,15
+13,15
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_containers, instr, "Paje tracing eve
static container_t rootContainer = nullptr; /* the root container */
static std::map<std::string, container_t> allContainers; /* all created containers indexed by name */
static container_t rootContainer = nullptr; /* the root container */
static std::map<std::string, container_t> allContainers; /* all created containers indexed by name */
-long long int instr_new_paje_id ()
+namespace simgrid {
+namespace instr {
+
+long long int new_paje_id()
{
static long long int type_id = 0;
return type_id++;
}
{
static long long int type_id = 0;
return type_id++;
}
-namespace simgrid {
-namespace instr {
-
Container* Container::get_root()
{
return rootContainer;
Container* Container::get_root()
{
return rootContainer;
@@
-91,6
+91,10
@@
Container::~Container()
// remove me from the allContainers data structure
allContainers.erase(name_);
// remove me from the allContainers data structure
allContainers.erase(name_);
+ // obligation to dump previous events because they might reference the container that is about to be destroyed
+ last_timestamp_to_dump = SIMIX_get_clock();
+ dump_buffer(true);
+
on_destruction(*this);
}
on_destruction(*this);
}
@@
-136,5
+140,13
@@
VariableType* Container::get_variable(const std::string& name)
{
return static_cast<VariableType*>(type_->by_name(name)->set_calling_container(this));
}
{
return static_cast<VariableType*>(type_->by_name(name)->set_calling_container(this));
}
+
+EntityValue::EntityValue(const std::string& name, const std::string& color, Type* father)
+ : name_(name), color_(color), father_(father)
+{
+ id_ = simgrid::instr::new_paje_id();
+ on_creation(*this);
+}
+
} // namespace instr
} // namespace simgrid
} // namespace instr
} // namespace simgrid