Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
allow all activities to set their tracing category
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Sun, 3 Feb 2019 15:42:01 +0000 (16:42 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Sun, 3 Feb 2019 15:42:01 +0000 (16:42 +0100)
src/kernel/activity/ActivityImpl.cpp
src/kernel/activity/ActivityImpl.hpp
src/kernel/activity/ExecImpl.cpp
src/kernel/activity/ExecImpl.hpp

index ff1cb4b..a92efa2 100644 (file)
@@ -9,6 +9,12 @@ namespace simgrid {
 namespace kernel {
 namespace activity {
 
+void simgrid::kernel::activity::ActivityImpl::set_category(std::string category)
+{
+  if (surf_action_)
+    surf_action_->set_category(category);
+}
+
 // boost::intrusive_ptr<Activity> support:
 void intrusive_ptr_add_ref(simgrid::kernel::activity::ActivityImpl* activity)
 {
index 5668b7a..7b8f091 100644 (file)
@@ -13,6 +13,7 @@
 #include "simgrid/forward.h"
 
 #include <atomic>
+#include <simgrid/kernel/resource/Action.hpp>
 #include <simgrid/simix.hpp>
 
 namespace simgrid {
@@ -33,6 +34,8 @@ public:
   virtual void resume()  = 0;
   virtual void post()    = 0; // What to do when a simcall terminates
 
+  void set_category(std::string category);
+
   // boost::intrusive_ptr<ActivityImpl> support:
   friend XBT_PUBLIC void intrusive_ptr_add_ref(ActivityImpl* activity);
   friend XBT_PUBLIC void intrusive_ptr_release(ActivityImpl* activity);
index 8e5fd99..edf9d2e 100644 (file)
@@ -101,12 +101,6 @@ void simgrid::kernel::activity::ExecImpl::set_priority(double priority)
     surf_action_->set_priority(priority);
 }
 
-void simgrid::kernel::activity::ExecImpl::set_category(std::string category)
-{
-  if (surf_action_)
-    surf_action_->set_category(category);
-}
-
 void simgrid::kernel::activity::ExecImpl::post()
 {
   if (host_ && host_->is_off()) { /* FIXME: handle resource failure for parallel tasks too */
index 4ed1ab7..0e6b57e 100644 (file)
@@ -28,7 +28,6 @@ public:
   double get_remaining_ratio();
   void set_bound(double bound);
   void set_priority(double priority);
-  void set_category(std::string category);
   virtual ActivityImpl* migrate(s4u::Host* to);
 
   /* The host where the execution takes place. nullptr means this is a parallel exec (and only surf knows the hosts) */