Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 29 Mar 2016 15:20:55 +0000 (17:20 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 29 Mar 2016 15:20:55 +0000 (17:20 +0200)
src/mc/CommunicationDeterminismChecker.cpp
src/mc/LivenessChecker.cpp
src/mc/LocationList.cpp
src/mc/RegionSnapshot.cpp
src/mc/SafetyChecker.cpp
src/mc/mc_checkpoint.cpp
src/mc/mc_dwarf.cpp
src/mc/mc_record.cpp
src/mc/mc_visited.cpp

index 93be2c0..b30b312 100644 (file)
@@ -329,7 +329,7 @@ RecordTrace CommunicationDeterminismChecker::getRecordTrace() // override
     res.push_back(RecordTraceElement(pid, value));
   }
 
-  return std::move(res);
+  return res;
 }
 
 // TODO, deduplicate with SafetyChecker
@@ -348,7 +348,7 @@ std::vector<std::string> CommunicationDeterminismChecker::getTextualTrace() // o
       xbt_free(req_str);
     }
   }
-  return std::move(res);
+  return res;
 }
 
 void CommunicationDeterminismChecker::prepare()
index c9be6e9..dd526a3 100644 (file)
@@ -145,7 +145,7 @@ simgrid::xbt::unique_ptr<s_xbt_dynar_t> LivenessChecker::getPropositionValues()
     int res = xbt_automaton_propositional_symbol_evaluate(ps);
     xbt_dynar_push_as(values.get(), int, res);
   }
-  return std::move(values);
+  return values;
 }
 
 int LivenessChecker::compare(simgrid::mc::VisitedPair* state1, simgrid::mc::VisitedPair* state2)
@@ -417,7 +417,7 @@ RecordTrace LivenessChecker::getRecordTrace() // override
     }
   }
 
-  return std::move(res);
+  return res;
 }
 
 void LivenessChecker::showAcceptanceCycle(std::size_t depth)
@@ -447,7 +447,7 @@ std::vector<std::string> LivenessChecker::getTextualTrace() // override
       xbt_free(req_str);
     }
   }
-  return std::move(trace);
+  return trace;
 }
 
 int LivenessChecker::main(void)
index 2797bc0..fdf5cd5 100644 (file)
@@ -112,7 +112,7 @@ LocationList location_list(
     locations.push_back({ DwarfExpression(ops, ops+len), range });
   }
 
-  return std::move(locations);
+  return locations;
 }
 
 
index fc74d88..8fe9a98 100644 (file)
@@ -101,7 +101,7 @@ RegionSnapshot dense_region(
 
   XBT_DEBUG("New region : type : %s, data : %p (real addr %p), size : %zu",
             to_cstr(region_type), region.flat_data().get(), permanent_addr, size);
-  return std::move(region);
+  return region;
 }
 
 /** @brief Take a snapshot of a given region
@@ -155,7 +155,7 @@ RegionSnapshot sparse_region(RegionType region_type,
   simgrid::mc::RegionSnapshot region(
     region_type, start_addr, permanent_addr, size);
   region.page_data(std::move(page_data));
-  return std::move(region);
+  return region;
 }
   
 }
index 8903c28..9848af7 100644 (file)
@@ -84,7 +84,7 @@ RecordTrace SafetyChecker::getRecordTrace() // override
     res.push_back(RecordTraceElement(pid, value));
   }
 
-  return std::move(res);
+  return res;
 }
 
 std::vector<std::string> SafetyChecker::getTextualTrace() // override
@@ -102,7 +102,7 @@ std::vector<std::string> SafetyChecker::getTextualTrace() // override
       xbt_free(req_str);
     }
   }
-  return std::move(trace);
+  return trace;
 }
 
 int SafetyChecker::run()
index 7e1084b..3658048 100644 (file)
@@ -110,7 +110,7 @@ RegionSnapshot privatized_region(
   simgrid::mc::RegionSnapshot region = simgrid::mc::RegionSnapshot(
     region_type, start_addr, permanent_addr, size);
   region.privatized_data(std::move(data));
-  return std::move(region);
+  return region;
 }
 #endif
 
@@ -353,7 +353,7 @@ static std::vector<s_local_variable> get_local_variables_values(
   std::vector<s_local_variable> variables;
   for (s_mc_stack_frame_t& stack_frame : stack_frames)
     fill_local_variables_values(&stack_frame, stack_frame.frame, process_index, variables);
-  return std::move(variables);
+  return variables;
 }
 
 static std::vector<s_mc_stack_frame_t> unwind_stack_frames(simgrid::mc::UnwindContext* stack_context)
@@ -412,7 +412,7 @@ static std::vector<s_mc_stack_frame_t> unwind_stack_frames(simgrid::mc::UnwindCo
     xbt_abort();
   }
 
-  return std::move(result);
+  return result;
 };
 
 static std::vector<s_mc_snapshot_stack_t> take_snapshot_stacks(simgrid::mc::Snapshot* snapshot)
@@ -442,7 +442,7 @@ static std::vector<s_mc_snapshot_stack_t> take_snapshot_stacks(simgrid::mc::Snap
     snapshot->stack_sizes.push_back(stack_size);
   }
 
-  return std::move(res);
+  return res;
 
 }
 
@@ -558,7 +558,7 @@ static std::vector<s_fd_infos_t> get_current_fds(pid_t pid)
   }
 
   closedir (fd_dir);
-  return std::move(fds);
+  return fds;
 }
 
 std::shared_ptr<simgrid::mc::Snapshot> take_snapshot(int num_state)
index 247d3fe..41161a4 100644 (file)
@@ -679,7 +679,7 @@ static simgrid::mc::Type MC_dwarf_die_to_type(
     break;
   }
 
-  return std::move(type);
+  return type;
 }
 
 static void MC_dwarf_handle_type_die(simgrid::mc::ObjectInformation* info, Dwarf_Die * die,
@@ -804,7 +804,7 @@ static std::unique_ptr<simgrid::mc::Variable> MC_die_to_variable(
     variable->name =
       "@anonymous#" + std::to_string(mc_anonymous_variable_index++);
 
-  return std::move(variable);
+  return variable;
 }
 
 static void MC_dwarf_handle_variable_die(simgrid::mc::ObjectInformation* info, Dwarf_Die * die,
@@ -1081,7 +1081,7 @@ std::string to_hex(const char* data, std::size_t count)
     for (int j = 0; j < 2; ++j)
       res[2 * i + j] = hex_byte[j];
   }
-  return std::move(res);
+  return res;
 }
 
 /** Binary data to hexadecimal */
@@ -1113,7 +1113,7 @@ std::string find_by_build_id(std::vector<char> id)
       + to_hex(id.data() + 1, id.size() - 1) + ".debug";
     XBT_DEBUG("Checking debug file: %s", filename.c_str());
     if (access(filename.c_str(), F_OK) == 0)
-      return std::move(filename);
+      return filename;
   }
   return std::string();
 }
@@ -1324,7 +1324,7 @@ std::shared_ptr<simgrid::mc::ObjectInformation> createObjectInformation(
   for (auto& entry : result.get()->subprograms)
     mc_post_process_scope(result.get(), &entry.second);
   MC_make_functions_index(result.get());
-  return std::move(result);
+  return result;
 }
 
 /*************************************************************************/
index 49f111f..19e7db4 100644 (file)
@@ -99,7 +99,7 @@ RecordTrace parseRecordTrace(const char* data)
       current = end + 1;
   }
 
-  return std::move(res);
+  return res;
 }
 
 #if HAVE_MC
index e802ccb..0e54ecb 100644 (file)
@@ -32,18 +32,6 @@ namespace mc {
 
 std::vector<std::unique_ptr<simgrid::mc::VisitedState>> visited_states;
 
-static int is_exploration_stack_state(simgrid::mc::VisitedState* state){
-  xbt_fifo_item_t item = xbt_fifo_get_first_item(mc_stack);
-  while (item) {
-    if (((simgrid::mc::State*)xbt_fifo_get_item_content(item))->num == state->num){
-      ((simgrid::mc::State*)xbt_fifo_get_item_content(item))->in_visited_states = 0;
-      return 1;
-    }
-    item = xbt_fifo_get_next_item(item);
-  }
-  return 0;
-}
-
 /**
  * \brief Save the current state
  * \return Snapshot of the current state.