}
/** @brief Checks whether a given state has already been visited by the algorithm. */
-std::unique_ptr<simgrid::mc::VisitedState> VisitedStates::addVisitedState(
- unsigned long state_number, simgrid::mc::State* graph_state, bool compare_snpashots)
+std::unique_ptr<simgrid::mc::VisitedState>
+VisitedStates::addVisitedState(unsigned long state_number, simgrid::mc::State* graph_state, bool compare_snapshots)
{
std::unique_ptr<simgrid::mc::VisitedState> new_state =
std::unique_ptr<simgrid::mc::VisitedState>(new VisitedState(state_number));
auto range =
boost::range::equal_range(states_, new_state.get(), simgrid::mc::DerefAndCompareByActorsCountAndUsedHeap());
- if (compare_snpashots)
+ if (compare_snapshots)
for (auto i = range.first; i != range.second; ++i) {
auto& visited_state = *i;
if (snapshot_equal(visited_state->system_state.get(), new_state->system_state.get())) {
std::vector<std::unique_ptr<simgrid::mc::VisitedState>> states_;
public:
void clear() { states_.clear(); }
- std::unique_ptr<simgrid::mc::VisitedState> addVisitedState(unsigned long state_number, simgrid::mc::State* graph_state, bool compare_snpashots);
+ std::unique_ptr<simgrid::mc::VisitedState> addVisitedState(unsigned long state_number,
+ simgrid::mc::State* graph_state, bool compare_snapshots);
+
private:
void prune();
};
&& addr_pointed1 < mc_snapshot_get_heap_end(snapshot1)
&& addr_pointed2 > state.std_heap_copy.heapbase
&& addr_pointed2 < mc_snapshot_get_heap_end(snapshot2)) {
- // Both addreses are in the heap:
+ // Both addresses are in the heap:
int res_compare =
compare_heap_area(state, addr_pointed1, addr_pointed2, snapshot1, snapshot2, previous, nullptr, 0);
if (res_compare == 1)
current_var2->subprogram->name.c_str(), current_var1->ip, current_var2->ip);
return false;
}
- // TODO, fix current_varX->subprogram->name to include name if DW_TAG_inlined_subprogram
if (compare_areas_with_type(state, current_var1->address, snapshot1, snapshot1->get_region(current_var1->address),
current_var2->address, snapshot2, snapshot2->get_region(current_var2->address),
current_var1->type, 0) == 1) {
- // TODO, fix current_varX->subprogram->name to include name if DW_TAG_inlined_subprogram
XBT_VERB("Local variable %s (%p - %p) in frame %s "
"is different between snapshots",
current_var1->name.c_str(), current_var1->address, current_var2->address,
*
* In order to save memory when taking memory snapshots, a given byte-string
* is split in fixed-size chunks. Identical chunks (either from the same
- * snapshot or more probably from different snpashots) share the same memory
+ * snapshot or more probably from different snapshots) share the same memory
* storage.
*
* Thus a chunked is represented as a sequence of indices of each chunk.