Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill useless empty functions.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 16 Oct 2017 11:31:49 +0000 (13:31 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 16 Oct 2017 12:00:03 +0000 (14:00 +0200)
13 files changed:
src/bindings/java/jmsg.cpp
src/include/mc/mc.h
src/mc/DwarfExpression.cpp
src/mc/DwarfExpression.hpp
src/mc/checker/Checker.cpp
src/mc/checker/Checker.hpp
src/mc/checker/CommunicationDeterminismChecker.cpp
src/mc/checker/LivenessChecker.cpp
src/mc/checker/SafetyChecker.cpp
src/mc/mc_memory.cpp
src/smpi/include/SmpiHost.hpp
src/smpi/internals/SmpiHost.cpp
src/surf/network_smpi.hpp

index 6119a64..21b56a9 100644 (file)
@@ -86,10 +86,6 @@ JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Msg_getClock(JNIEnv * env, jclass
   return (jdouble) MSG_get_clock();
 }
 
-static void __JAVA_host_priv_free(void *host)
-{
-}
-
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs)
 {
   int argc = 0;
@@ -124,7 +120,7 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, j
 
   MSG_init(&argc, argv);
 
-  JAVA_HOST_LEVEL = simgrid::s4u::Host::extension_create(__JAVA_host_priv_free);
+  JAVA_HOST_LEVEL = simgrid::s4u::Host::extension_create(nullptr);
 
   for (int index = 0; index < argc - 1; index++) {
     env->SetObjectArrayElement(jargs, index, (jstring)env->NewStringUTF(argv[index + 1]));
index 23f056f..d3f6b29 100644 (file)
@@ -64,8 +64,6 @@ XBT_PRIVATE void MC_automaton_load(const char *file);
 
 /********************************* Memory *************************************/
 XBT_PUBLIC(void) MC_memory_init();  /* Initialize the memory subsystem */
-XBT_PUBLIC(void) MC_memory_exit();
-XBT_PUBLIC(void) MC_memory_init_server();
 
 SG_END_DECL()
 
index bfa4f16..b20366d 100644 (file)
@@ -24,8 +24,6 @@ using simgrid::mc::remote;
 namespace simgrid {
 namespace dwarf {
 
-evaluation_error::~evaluation_error() noexcept(true) {}
-
 void execute(
   const Dwarf_Op* ops, std::size_t n,
   const ExpressionContext& context, ExpressionStack& stack)
index 09160c8..defb89c 100644 (file)
@@ -59,7 +59,6 @@ public:
 class evaluation_error : std::runtime_error {
 public:
   evaluation_error(const char* what): std::runtime_error(what) {}
-  ~evaluation_error() noexcept(true);
 };
 
 /** A stack for evaluating a DWARF expression
index a685913..1476c24 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016. The SimGrid Team.
+/* Copyright (c) 2016-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -25,22 +25,5 @@ Checker::~Checker()
 {
 }
 
-// virtual
-RecordTrace Checker::getRecordTrace()
-{
-  return {};
-}
-
-// virtual
-std::vector<std::string> Checker::getTextualTrace()
-{
-  return {};
-}
-
-// virtual
-void Checker::logState()
-{
-}
-
 }
 }
index 4de42ae..417c085 100644 (file)
@@ -52,13 +52,13 @@ public:
   /** Show the current trace/stack
    *
    *  Could this be handled in the Session/ModelChecker instead? */
-  virtual RecordTrace getRecordTrace();
+  virtual RecordTrace getRecordTrace() = 0;
 
   /** Generate a textual execution trace of the simulated application */
-  virtual std::vector<std::string> getTextualTrace();
+  virtual std::vector<std::string> getTextualTrace() = 0;
 
   /** Log additional information about the state of the model-checker */
-  virtual void logState();
+  virtual void logState() = 0;
 
 protected:
   Session& getSession() { return *session_; }
index 7fb06e5..955a2f2 100644 (file)
@@ -316,7 +316,6 @@ std::vector<std::string> CommunicationDeterminismChecker::getTextualTrace() // o
 
 void CommunicationDeterminismChecker::logState() // override
 {
-  Checker::logState();
   if (_sg_mc_comms_determinism && not this->recv_deterministic && this->send_deterministic) {
     XBT_INFO("******************************************************");
     XBT_INFO("**** Only-send-deterministic communication pattern ****");
index 6eef330..e74980e 100644 (file)
@@ -266,7 +266,6 @@ RecordTrace LivenessChecker::getRecordTrace() // override
 
 void LivenessChecker::logState() // override
 {
-  Checker::logState();
   XBT_INFO("Expanded pairs = %lu", expandedPairsCount_);
   XBT_INFO("Visited pairs = %lu", visitedPairsCount_);
   XBT_INFO("Executed transitions = %lu", mc_model_checker->executed_transitions);
index 0003a8f..8bad4a5 100644 (file)
@@ -79,7 +79,6 @@ std::vector<std::string> SafetyChecker::getTextualTrace() // override
 
 void SafetyChecker::logState() // override
 {
-  Checker::logState();
   XBT_INFO("Expanded states = %lu", expandedStatesCount_);
   XBT_INFO("Visited states = %lu", mc_model_checker->visited_states);
   XBT_INFO("Executed transitions = %lu", mc_model_checker->executed_transitions);
index 28ff84b..2864b9d 100644 (file)
@@ -26,9 +26,4 @@ void MC_memory_init()
     xbt_die("Model-checking support is not enabled: run with simgrid-mc.");
 }
 
-/* Finalize the memory subsystem */
-void MC_memory_exit()
-{
-}
-
 }
index a3667fe..d1bca75 100644 (file)
 namespace simgrid {
 namespace smpi {
 
-void sg_smpi_host_init();
-static void onHostDestruction(simgrid::s4u::Host& host);
-static void onCreation(simgrid::s4u::Host& host);
-
 class SmpiHost {
 
   private:
index 2fe8025..95e4217 100644 (file)
@@ -114,23 +114,5 @@ SmpiHost::SmpiHost(simgrid::s4u::Host *ptr) : host(ptr)
 }
 
 SmpiHost::~SmpiHost()=default;
-
-static void onCreation(simgrid::s4u::Host& host)
-{
-}
-
-static void onHostDestruction(simgrid::s4u::Host& host)
-{
-  // Ignore virtual machines
-  if (dynamic_cast<simgrid::s4u::VirtualMachine*>(&host))
-    return;
-}
-
-void sg_smpi_host_init()
-{
-  simgrid::s4u::Host::onCreation.connect(&onCreation);
-  simgrid::s4u::Host::onDestruction.connect(&onHostDestruction);
-}
-
 }
 }
index 1ab37a7..8a91cb8 100644 (file)
@@ -19,7 +19,6 @@ namespace simgrid {
       double latencyFactor(double size);
       double bandwidthFactor(double size);
       double bandwidthConstraint(double rate, double bound, double size);
-      void communicateCallBack() {};
     };
   }
 }