Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove/cleanup/fix #include
authorGabriel Corona <gabriel.corona@loria.fr>
Fri, 26 Feb 2016 14:13:38 +0000 (15:13 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Fri, 26 Feb 2016 14:19:22 +0000 (15:19 +0100)
27 files changed:
src/mc/AddressSpace.hpp
src/mc/Process.cpp
src/mc/Process.hpp
src/mc/RegionSnapshot.cpp
src/mc/RegionSnapshot.hpp
src/mc/Type.hpp
src/mc/Variable.hpp
src/mc/mc_client.h
src/mc/mc_comm_determinism.cpp
src/mc/mc_dwarf.hpp
src/mc/mc_hash.cpp
src/mc/mc_hash.hpp
src/mc/mc_ignore.h
src/mc/mc_memory.cpp
src/mc/mc_mmu.h
src/mc/mc_pair.cpp
src/mc/mc_protocol.h
src/mc/mc_record.cpp
src/mc/mc_record.h
src/mc/mc_replay.h
src/mc/mc_request.cpp
src/mc/mc_safety.cpp
src/mc/mc_smx.cpp
src/mc/mc_smx.h
src/mc/mc_xbt.cpp
src/mc/mc_xbt.hpp
src/mc/simgrid_mc.cpp

index 8d370bd..0ff146a 100644 (file)
@@ -11,8 +11,6 @@
 #include <cstdint>
 #include <type_traits>
 
-#include <xbt/misc.h>
-
 #include "src/mc/mc_forward.hpp"
 #include "src/mc/remote_ptr.hpp"
 
index 9fa3ba4..482c07d 100644 (file)
@@ -24,6 +24,9 @@
 #include <libunwind.h>
 #include <libunwind-ptrace.h>
 
+#include <xbt/dynar.h>
+#include <xbt/log.h>
+#include <xbt/base.h>
 #include <xbt/mmalloc.h>
 
 #include "src/mc/mc_object_info.h"
index bb7194e..4ab4e06 100644 (file)
@@ -19,6 +19,7 @@
 #include <simgrid_config.h>
 
 #include <xbt/base.h>
+#include <xbt/dynar.h>
 #include <xbt/mmalloc.h>
 
 #ifdef HAVE_MC
@@ -50,14 +51,14 @@ namespace mc {
 
 struct IgnoredRegion {
   std::uint64_t addr;
-  size_t size;
+  std::size_t size;
 };
 
 struct IgnoredHeapRegion {
   int block;
   int fragment;
   void *address;
-  size_t size;
+  std::size_t size;
 };
 
 /** Representation of a process
index 8a8c370..7e96951 100644 (file)
@@ -4,6 +4,8 @@
 /* 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 <cstdlib>
+
 #include <sys/mman.h>
 
 #include "mc/mc.h"
@@ -41,7 +43,7 @@ void data_deleter::operator()(void* p) const
 {
   switch(type_) {
   case Free:
-    free(p);
+    std::free(p);
     break;
   case Munmap:
     munmap(p, size_);
@@ -55,7 +57,7 @@ RegionSnapshot dense_region(
 {
   simgrid::mc::RegionSnapshot::flat_data_ptr data;
   if (!_sg_mc_ksm)
-    data = simgrid::mc::RegionSnapshot::flat_data_ptr((char*) malloc(size));
+    data = simgrid::mc::RegionSnapshot::flat_data_ptr((char*) std::malloc(size));
   else {
     char* ptr = (char*) mmap(nullptr, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_POPULATE, -1, 0);
     if (ptr == MAP_FAILED)
index 1ece645..a003191 100644 (file)
 #include <cstddef>
 #include <utility>
 
+#include <memory>
+#include <vector>
+
 #include <xbt/base.h>
 
+#include "src/mc/remote_ptr.hpp"
 #include "src/mc/PageStore.hpp"
 #include "src/mc/AddressSpace.hpp"
 #include "src/mc/ChunkedData.hpp"
index f94d944..5839a3b 100644 (file)
@@ -7,10 +7,15 @@
 #ifndef SIMGRID_MC_TYPE_HPP
 #define SIMGRID_MC_TYPE_HPP
 
+#include <cstddef>
+
 #include <vector>
 #include <string>
 
 #include <xbt/base.h>
+#include <xbt/asserts.h>
+
+#include <dwarf.h>
 
 #include "src/mc/mc_forward.h"
 #include "src/mc/LocationList.hpp"
index 5b82b6c..7e04621 100644 (file)
@@ -7,9 +7,9 @@
 #ifndef SIMGRID_MC_VARIABLE_HPP
 #define SIMGRID_MC_VARIABLE_HPP
 
-#include <string>
+#include <cstddef>
 
-#include <xbt/base.h>
+#include <string>
 
 #include "src/mc/mc_forward.h"
 #include "src/mc/LocationList.hpp"
@@ -29,7 +29,7 @@ public:
   // Use either of:
   simgrid::dwarf::LocationList location_list;
   void* address = nullptr;
-  size_t start_scope = 0;
+  std::size_t start_scope = 0;
   simgrid::mc::ObjectInformation* object_info = nullptr;
 };
 
index 6b68dbe..fb12858 100644 (file)
@@ -7,7 +7,9 @@
 #ifndef SIMGRID_MC_CLIENT_H
 #define SIMGRID_MC_CLIENT_H
 
-#include <xbt/misc.h>
+#include <cstddef>
+
+#include <xbt/base.h>
 #include "src/mc/mc_protocol.h"
 
 SG_BEGIN_DECL()
@@ -21,11 +23,11 @@ extern XBT_PRIVATE mc_client_t mc_client;
 
 XBT_PRIVATE void MC_client_init(void);
 XBT_PRIVATE void MC_client_handle_messages(void);
-XBT_PRIVATE void MC_client_send_message(void* message, size_t size);
+XBT_PRIVATE void MC_client_send_message(void* message, std::size_t size);
 XBT_PRIVATE void MC_client_send_simple_message(e_mc_message_type type);
 
 #ifdef HAVE_MC
-void MC_ignore(void* addr, size_t size);
+void MC_ignore(void* addr, std::size_t size);
 #endif
 
 void MC_client_main_loop(void);
index 9b98b74..1be100a 100644 (file)
@@ -4,6 +4,13 @@
 /* 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 <xbt/dynar.h>
+#include <xbt/fifo.h>
+#include <xbt/log.h>
+#include <xbt/sysdep.h>
+
 #include "src/mc/mc_state.h"
 #include "src/mc/mc_comm_pattern.h"
 #include "src/mc/mc_request.h"
index 85c7641..62fb9a1 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <string.h>
 
+#include <xbt/base.h>
 #include <xbt/sysdep.h>
 
 #define DW_LANG_Objc DW_LANG_ObjC       /* fix spelling error in older dwarf.h */
index b260507..72dd93c 100644 (file)
@@ -8,7 +8,10 @@
 
 #include <cstdint>
 
+#include <xbt/log.h>
+
 #include "src/mc/mc_private.h"
+#include "src/mc/mc_snapshot.h"
 #include "mc/datatypes.h"
 #include "src/mc/mc_hash.hpp"
 #include <mc/mc.h>
index 767fcc0..68a408a 100644 (file)
@@ -8,10 +8,10 @@
 #define SIMGRID_MC_HASH_HPP
 
 #include <cstdint>
-#include <vector>
 
-#include "xbt/misc.h"
-#include "src/mc/mc_snapshot.h"
+#include <xbt/base.h>
+
+#include "src/mc/mc_forward.hpp"
 
 namespace simgrid {
 namespace mc {
index 4824094..ba91c35 100644 (file)
@@ -7,13 +7,9 @@
 #ifndef SIMGRID_MC_IGNORE_H
 #define SIMGRID_MC_IGNORE_H
 
+#include <xbt/base.h>           /* SG_BEGIN_DECL */
 #include <xbt/dynar.h>
 
-#include "mc/datatypes.h"
-#include "src/mc/Process.hpp"
-
-#include "xbt/misc.h"           /* SG_BEGIN_DECL */
-
 SG_BEGIN_DECL();
 
 XBT_PRIVATE xbt_dynar_t MC_checkpoint_ignore_new(void);
index 7cc36bd..3df9bbe 100644 (file)
@@ -8,8 +8,6 @@
 #include <fcntl.h>
 
 #include "xbt/log.h"
-#include "xbt/dynar.h"
-#include "xbt/virtu.h"
 
 #include "mc/mc.h"
 #include "src/mc/mc_private.h"
index e0236e5..50b83dd 100644 (file)
@@ -8,8 +8,10 @@
 #define SIMGRID_MC_MMU_H
 
 #include <cstdint>
+#include <cstddef>
 
 #include <xbt/asserts.h>
+#include <xbt/base.h> // xbt_pagesize...
 #include <xbt/misc.h>
 
 #include <simgrid_config.h>
index 21208f3..afed72a 100644 (file)
@@ -4,6 +4,9 @@
 /* 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/dynar.h>
+#include <xbt/sysdep.h>
+
 #include "src/mc/mc_liveness.h"
 #include "src/mc/mc_private.h"
 
index 5858f54..bd6fd13 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <stdint.h>
 
-#include <xbt/misc.h>
+#include <xbt/base.h>
 
 #include "mc/datatypes.h"
 
index 9ac3ecb..f0ff676 100644 (file)
@@ -8,6 +8,7 @@
 #include <cstdio>
 #include <cstdlib>
 
+#include <xbt/fifo.h>
 #include <xbt/log.h>
 #include <xbt/sysdep.h>
 
index 94f6040..17493f0 100644 (file)
@@ -18,6 +18,8 @@
 #define SIMGRID_MC_RECORD_H
 
 #include <xbt/base.h>
+#include <xbt/dynar.h>
+#include <xbt/fifo.h>
 
 SG_BEGIN_DECL()
 
index 5dc957a..cfd41a6 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SIMGRID_MC_REPLAY_H
 #define SIMGRID_MC_REPLAY_H
 
-#include <xbt/misc.h>
+#include <xbt/base.h>
 
 SG_BEGIN_DECL()
 
index c0708c4..c52a33c 100644 (file)
@@ -10,7 +10,6 @@
 #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"
index f25f11c..594cb71 100644 (file)
@@ -9,6 +9,7 @@
 #include <cstdio>
 
 #include <xbt/log.h>
+#include <xbt/dynar.h>
 #include <xbt/fifo.h>
 #include <xbt/sysdep.h>
 
index 9abf26b..205fcf7 100644 (file)
@@ -5,14 +5,17 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <cassert>
+#include <cstdlib>
 
 #include <xbt/log.h>
-#include <xbt/string.hpp>
+#include <xbt/dynar.h>
+#include <xbt/str.h>
+#include <xbt/swag.h>
 
 #include "src/simix/smx_private.h"
 
 #include "src/mc/mc_smx.h"
-#include "ModelChecker.hpp"
+#include "src/mc/ModelChecker.hpp"
 
 using simgrid::mc::remote;
 
@@ -22,7 +25,7 @@ static
 void MC_smx_process_info_clear(mc_smx_process_info_t p)
 {
   p->hostname = nullptr;
-  free(p->name);
+  std::free(p->name);
   p->name = nullptr;
 }
 
index 31fdaba..3ca4e5d 100644 (file)
@@ -10,6 +10,7 @@
 #include <stddef.h>
 
 #include <xbt/base.h>
+#include <xbt/dynar.h>
 #include <xbt/log.h>
 
 #include <simgrid/simix.h>
index 8a2ff91..bfdd156 100644 (file)
@@ -10,6 +10,7 @@
 #include "src/mc/AddressSpace.hpp"
 #include "src/mc/mc_xbt.hpp"
 
+#include <xbt/dynar.h>
 #include <xbt/sysdep.h>
 
 namespace simgrid {
index 4640bff..cc23b1a 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <cstddef>
 
-#include <xbt/base.h>
+#include <xbt/dynar.h>
 
 #include "src/mc/remote_ptr.hpp"
 #include "src/mc/AddressSpace.hpp"
index a0e7272..8b7962b 100644 (file)
@@ -27,6 +27,7 @@
 #endif
 
 #include <xbt/log.h>
+#include <xbt/sysdep.h>
 #include <xbt/system_error.hpp>
 
 #include "simgrid/sg_config.h"