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
[sonar] Remove variadic functions.
[simgrid.git]
/
src
/
instr
/
instr_platform.cpp
diff --git
a/src/instr/instr_platform.cpp
b/src/instr/instr_platform.cpp
index
1901f25
..
f0433c4
100644
(file)
--- a/
src/instr/instr_platform.cpp
+++ b/
src/instr/instr_platform.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2010-201
8
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-201
9
. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-306,7
+306,7
@@
static void instr_actor_on_creation(simgrid::s4u::ActorPtr actor)
std::string container_name = instr_pid(actor.get());
actor->on_exit(
std::string container_name = instr_pid(actor.get());
actor->on_exit(
- [container_name](int status, void*
actor
) {
+ [container_name](int status, void*) {
if (status == SMX_EXIT_FAILURE)
// kill means that this actor no longer exists, let's destroy it
simgrid::instr::Container::by_name(container_name)->remove_from_parent();
if (status == SMX_EXIT_FAILURE)
// kill means that this actor no longer exists, let's destroy it
simgrid::instr::Container::by_name(container_name)->remove_from_parent();
@@
-372,6
+372,11
@@
void instr_define_callbacks()
if (TRACE_actor_is_enabled()) {
simgrid::s4u::Actor::on_creation.connect(instr_actor_on_creation);
if (TRACE_actor_is_enabled()) {
simgrid::s4u::Actor::on_creation.connect(instr_actor_on_creation);
+ simgrid::s4u::Actor::on_destruction.connect([](simgrid::s4u::ActorPtr actor) {
+ auto container = simgrid::instr::Container::by_name_or_null(instr_pid(actor.get()));
+ if (container != nullptr)
+ container->remove_from_parent();
+ });
simgrid::s4u::Actor::on_suspend.connect([](simgrid::s4u::ActorPtr actor) {
simgrid::instr::Container::by_name(instr_pid(actor.get()))->get_state("ACTOR_STATE")->push_event("suspend");
});
simgrid::s4u::Actor::on_suspend.connect([](simgrid::s4u::ActorPtr actor) {
simgrid::instr::Container::by_name(instr_pid(actor.get()))->get_state("ACTOR_STATE")->push_event("suspend");
});