#include <vector>
-#include <xbt/misc.h>
+#include <xbt/misc.h> // xbt_pagesize and friends
#include <xbt/asserts.h>
#include "src/mc/AddressSpace.hpp"
#include <cstdint>
#include <cstdlib>
-#include <stdexcept>
+#include <stdexcept> // runtime_error
#include <utility>
#include <vector>
/* 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. */
+#include <libunwind.h>
+
+#include <xbt/sysdep.h>
+
#include "src/mc/Frame.hpp"
namespace simgrid {
{
simgrid::dwarf::Location location = simgrid::dwarf::resolve(
frame_base_location, object_info,
- &unw_cursor, NULL, NULL, -1);
+ &unw_cursor, nullptr, nullptr, -1);
if (location.in_memory())
return location.address();
else if (location.in_register()) {
/* 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. */
+#include <cstddef>
+#include <cstdint>
+#include <utility>
+
+#include <xbt/asserts.h>
+#include <xbt/sysdep.h>
+
+#include <libunwind.h>
+
#include "src/mc/mc_dwarf.hpp"
#include "src/mc/ObjectInformation.hpp"
#include "src/mc/LocationList.hpp"
/* 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. */
+#include <cstdint>
+
+#include <vector>
+
#include "src/mc/Frame.hpp"
#include "src/mc/ObjectInformation.hpp"
#include "src/mc/Variable.hpp"
#include <assert.h>
#include <stddef.h>
-#include <stdbool.h>
#include <stdint.h>
#include <errno.h>
#ifndef SIMGRID_MC_PROCESS_H
#define SIMGRID_MC_PROCESS_H
-#include <type_traits>
-
-#include <sys/types.h>
+#include <cstdint>
+#include <cstddef>
+#include <type_traits>
#include <vector>
#include <memory>
-#include "simgrid_config.h"
#include <sys/types.h>
+#include <simgrid_config.h>
+
#include <xbt/base.h>
#include <xbt/mmalloc.h>
#include "src/mc/mc_forward.hpp"
#include "src/mc/mc_base.h"
-#include "src/mc/mc_mmalloc.h" // std_heap
#include "src/mc/AddressSpace.hpp"
#include "src/mc/mc_protocol.h"
#include "src/mc/ObjectInformation.hpp"
/* 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. */
-#include <assert.h>
+#include <cassert>
+
+#include <simgrid_config.h>
+
+#include <xbt/log.h>
+#include <xbt/asserts.h>
+#include <xbt/dynar.h>
#include <simgrid/simix.h>
#include "src/mc/mc_base.h"
#include "src/simix/smx_private.h"
-#include "src/mc/mc_record.h"
#include "src/mc/mc_replay.h"
#include "mc/mc.h"
#include "src/mc/mc_protocol.h"
#include "xbt/module.h"
#include <xbt/mmalloc.h>
#include "src/smpi/private.h"
-#include <alloca.h>
#include "src/xbt/mmalloc/mmprivate.h"
#include "src/mc/mc_client.h"
// We won't need those once the separation MCer/MCed is complete:
-#include "src/mc/mc_mmalloc.h"
#include "src/mc/mc_ignore.h"
#include "src/mc/mc_private.h" // MC_deadlock_check()
#include "src/mc/mc_smx.h"
#include "src/mc/mc_record.h"
#include "src/mc/mc_private.h"
-#include "src/mc/mc_mmalloc.h"
#include "src/mc/mc_ignore.h"
#include "src/mc/mc_protocol.h"
#include "src/mc/mc_client.h"
#include "mc_base.h"
+#include "mc/mc.h"
+
#ifndef _XBT_WIN32
#include <unistd.h>
#include <sys/wait.h>
#include <xbt/fifo.h>
#include <xbt/automaton.h>
+#include "src/simix/smx_process_private.h"
+
#ifdef HAVE_MC
#include <libunwind.h>
#include "src/mc/mc_comm_pattern.h"
/* 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. */
+#include <cstring>
+
#include <unistd.h>
#include <sys/wait.h>
-#include <xbt/dynar.h>
#include <xbt/automaton.h>
+#include <xbt/dynar.h>
+#include <xbt/fifo.h>
+#include <xbt/log.h>
+#include <xbt/parmap.h>
+#include <xbt/sysdep.h>
#include "src/mc/mc_request.h"
#include "src/mc/mc_liveness.h"
unsigned int cursor = 0;
xbt_automaton_propositional_symbol_t p = NULL;
xbt_dynar_foreach(_mc_property_automaton->propositional_symbols, cursor, p) {
- if (strcmp(xbt_automaton_propositional_symbol_get_name(p), l->u.predicat) == 0)
+ if (std::strcmp(xbt_automaton_propositional_symbol_get_name(p), l->u.predicat) == 0)
return (int) xbt_dynar_get_as(atomic_propositions_values, cursor, int);
}
return -1;
#include <stdint.h>
#include <simgrid_config.h>
+#include <xbt/base.h>
#include <xbt/fifo.h>
#include <xbt/dynar.h>
#include <xbt/automaton.h>
/* 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. */
-#include <xbt/misc.h>
-
#include "src/mc/mc_private.h"
#include "src/mc/Type.hpp"
#include "src/mc/mc_dwarf.hpp"
-
namespace simgrid {
namespace dwarf {
-/* Copyright (c) 2007-2015. 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. */
-
-#ifndef SIMGRID_MC_MMALLOC_H
-#define SIMGRID_MC_MMALLOC_H
-
-#include <xbt/misc.h>
-#include <xbt/mmalloc.h>
-
-/** file
- * Support for seperate heaps.
- *
- * The possible memory modes for the modelchecker are standard and raw.
- * Normally the system should operate in std, for switching to raw mode
- * you must wrap the code between MC_SET_RAW_MODE and MC_UNSET_RAW_MODE.
- */
-
-SG_BEGIN_DECL()
-
-/* FIXME: Horrible hack! because the mmalloc library doesn't provide yet of */
-/* an API to query about the status of a heap, we simply call mmstats and */
-/* because I now how does structure looks like, then I redefine it here */
-
-/* struct mstats { */
-/* size_t bytes_total; /\* Total size of the heap. *\/ */
-/* size_t chunks_used; /\* Chunks allocated by the user. *\/ */
-/* size_t bytes_used; /\* Byte total of user-allocated chunks. *\/ */
-/* size_t chunks_free; /\* Chunks in the free list. *\/ */
-/* size_t bytes_free; /\* Byte total of chunks in the free list. *\/ */
-/* }; */
-
-SG_END_DECL()
-
-#endif
#ifndef SIMGRID_MC_MMU_H
#define SIMGRID_MC_MMU_H
-#include <stdint.h>
-#include <stdbool.h>
+#include <cstdint>
#include <xbt/asserts.h>
#include <xbt/misc.h>
size_t mc_page_number(const void* base, const void* address)
{
xbt_assert(address>=base, "The address is not in the range");
- return ((uintptr_t) address - (uintptr_t) base) >> xbt_pagebits;
+ return ((std::uintptr_t) address - (std::uintptr_t) base) >> xbt_pagebits;
}
/** @brief Get the offset of an address within a memory page
static inline __attribute__ ((always_inline))
size_t mc_page_offset(const void* address)
{
- return ((uintptr_t) address) & (xbt_pagesize-1);
+ return ((std::uintptr_t) address) & (xbt_pagesize-1);
}
/** @brief Get the virtual address of a virtual memory page
static inline __attribute__ ((always_inline))
bool mc_same_page(const void* a, const void* b)
{
- return ((uintptr_t) a >> xbt_pagebits) == ((uintptr_t) b >> xbt_pagebits);
+ return ((std::uintptr_t) a >> xbt_pagebits)
+ == ((std::uintptr_t) b >> xbt_pagebits);
}
SG_END_DECL()
#include <cstdio>
#include <cstdlib>
+#include <xbt/log.h>
+#include <xbt/sysdep.h>
+
#include "simgrid/simix.h"
+#include "src/simix/smx_private.h"
+#include "src/simix/smx_process_private.h"
+
#include "src/mc/mc_replay.h"
#include "src/mc/mc_record.h"
#include "src/mc/mc_base.h"
#ifndef SIMGRID_MC_RECORD_H
#define SIMGRID_MC_RECORD_H
-#include <stdbool.h>
-
#include <xbt/base.h>
SG_BEGIN_DECL()
/* 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. */
-#include <assert.h>
+#include <cassert>
+
+#include <xbt/log.h>
+#include <xbt/str.h>
+#include <xbt/sysdep.h>
+#include <xbt/dynar.h>
+#include <xbt/misc.h>
#include "src/mc/mc_request.h"
#include "src/mc/mc_safety.h"
#include <xbt/base.h>
-#include <simgrid_config.h>
-
#include "src/simix/smx_private.h"
SG_BEGIN_DECL()
/* 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. */
-#include <assert.h>
+#include <cassert>
+
+#include <cstdio>
+
+#include <xbt/log.h>
+#include <xbt/fifo.h>
+#include <xbt/sysdep.h>
#include "src/mc/mc_state.h"
#include "src/mc/mc_request.h"
);
if (dot_output != NULL)
- fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", state->num, next_state->num, req_str);
+ std::fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", state->num, next_state->num, req_str);
} else {
if (dot_output != NULL)
- fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", state->num, visited_state->other_num == -1 ? visited_state->num : visited_state->other_num, req_str);
+ std::fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", state->num, visited_state->other_num == -1 ? visited_state->num : visited_state->other_num, req_str);
}
#include <stdint.h>
#include <simgrid_config.h>
+
#include <xbt/base.h>
-#include <xbt/dict.h>
+#include <xbt/dynar.h>
+
#include "src/mc/mc_forward.hpp"
#include "src/mc/mc_state.h"
/* 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. */
-#include <assert.h>
+#include <cassert>
#include <xbt/log.h>
#include <xbt/string.hpp>
#include <stddef.h>
+#include <xbt/base.h>
#include <xbt/log.h>
+
#include <simgrid/simix.h>
#include "src/smpi/private.h"
/* 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. */
-#include <stdbool.h>
+#include <cstddef>
+
+#include <memory>
+#include <utility>
+
+#include <xbt/asserts.h>
+#include <xbt/sysdep.h>
#include "src/internal_config.h"
#include "src/smpi/private.h"
#ifndef SIMGRID_MC_SNAPSHOT_H
#define SIMGRID_MC_SNAPSHOT_H
-#include <sys/types.h> // off_t
-#include <stdint.h> // size_t
+#include <cstdint>
+#include <cstddef>
#include <vector>
#include <set>
+#include <string>
#include <memory>
+#include <sys/types.h> // off_t
+
#include <simgrid_config.h>
#include "src/xbt/mmalloc/mmprivate.h"
#include <xbt/asserts.h>
-#include <xbt/dynar.h>
#include <xbt/base.h>
#include "src/mc/mc_forward.hpp"
#include "src/mc/ModelChecker.hpp"
#include "src/mc/PageStore.hpp"
-#include "src/mc/mc_mmalloc.h"
#include "src/mc/AddressSpace.hpp"
#include "src/mc/mc_unw.h"
#include "src/mc/RegionSnapshot.hpp"
#include <assert.h>
+#include <xbt/log.h>
+#include <xbt/sysdep.h>
+#include <xbt/fifo.h>
+
#include "src/simix/smx_private.h"
-#include "xbt/fifo.h"
#include "src/mc/mc_state.h"
#include "src/mc/mc_request.h"
#include "src/mc/mc_private.h"
#define SIMGRID_MC_STATE_H
#include <xbt/base.h>
+#include <xbt/dynar.h>
#include <simgrid_config.h>
#include "src/simix/smx_private.h"
#include <xbt/base.h>
+#include <libunwind.h>
+
#include "src/mc/Process.hpp"
SG_BEGIN_DECL()
#include <unistd.h>
#include <sys/wait.h>
+#include <xbt/automaton.h>
+#include <xbt/log.h>
+#include <xbt/sysdep.h>
+#include <xbt/dynar.h>
+#include <xbt/fifo.h>
+
#include "src/mc/mc_comm_pattern.h"
#include "src/mc/mc_safety.h"
#include "src/mc/mc_liveness.h"
/* 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. */
-#include <xbt/sysdep.h>
+#include <cstddef>
+#include "src/mc/remote_ptr.hpp"
#include "src/mc/AddressSpace.hpp"
#include "src/mc/mc_xbt.hpp"
+#include <xbt/sysdep.h>
+
namespace simgrid {
namespace mc {
void read_element(AddressSpace const& as,
- void* local, remote_ptr<s_xbt_dynar_t> addr, size_t i, size_t len)
+ void* local, remote_ptr<s_xbt_dynar_t> addr, std::size_t i, std::size_t len)
{
s_xbt_dynar_t d;
as.read_bytes(&d, sizeof(d), addr);
#ifndef SIMGRID_MC_XBT_HPP
#define SIMGRID_MC_XBT_HPP
+#include <cstddef>
+
#include <xbt/base.h>
+#include "src/mc/remote_ptr.hpp"
#include "src/mc/AddressSpace.hpp"
namespace simgrid {
namespace mc {
XBT_PRIVATE void read_element(AddressSpace const& as,
- void* local, remote_ptr<s_xbt_dynar_t> addr, size_t i, size_t len);
+ void* local, remote_ptr<s_xbt_dynar_t> addr, std::size_t i, std::size_t len);
XBT_PRIVATE std::size_t read_length(
AddressSpace const& as, remote_ptr<s_xbt_dynar_t> addr);
src/mc/mc_unw.h
src/mc/mc_unw.cpp
src/mc/mc_unw_vmread.cpp
- src/mc/mc_mmalloc.h
src/mc/mc_object_info.h
src/mc/mc_checkpoint.cpp
src/mc/mc_snapshot.h