-/* Copyright (c) 2008-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2008-2018. 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_PROCESS_H
#define SIMGRID_MC_PROCESS_H
-#include <cstddef>
-#include <cstdint>
-
-#include <memory>
-#include <string>
-#include <type_traits>
-#include <vector>
-
-#include <sys/types.h>
-
-#include <simgrid_config.h>
-
-#include "xbt/base.h"
-#include <xbt/mmalloc.h>
-
#include "src/xbt/mmalloc/mmprivate.h"
-
#include "src/mc/remote/Channel.hpp"
-#include "src/mc/remote/RemotePtr.hpp"
-
-#include "src/simix/popping_private.h"
-#include "src/simix/smx_private.h"
-#include <simgrid/simix.h>
-
-#include "src/xbt/memory_map.hpp"
-
-#include "src/mc/AddressSpace.hpp"
#include "src/mc/ObjectInformation.hpp"
-#include "src/mc/mc_base.h"
-#include "src/mc/mc_forward.hpp"
-#include "src/mc/remote/mc_protocol.h"
+
+#include <vector>
namespace simgrid {
namespace mc {
class ActorInformation {
public:
/** MCed address of the process */
- RemotePtr<simgrid::simix::ActorImpl> address = nullptr;
- Remote<simgrid::simix::ActorImpl> copy;
+ RemotePtr<simgrid::kernel::actor::ActorImpl> address{nullptr};
+ Remote<simgrid::kernel::actor::ActorImpl> copy;
/** Hostname (owned by `mc_modelchecker->hostnames`) */
const char* hostname = nullptr;
}
std::string read_string(RemotePtr<char> address) const;
- std::string read_string(RemotePtr<char> address, std::size_t len) const
- {
- return AddressSpace::read_string(address, len);
- }
+ using AddressSpace::read_string;
// Write memory:
void write_bytes(const void* buffer, size_t len, RemotePtr<void> address);
std::vector<simgrid::mc::ActorInformation>& dead_actors();
/** Get a local description of a remote SIMIX actor */
- simgrid::mc::ActorInformation* resolveActorInfo(simgrid::mc::RemotePtr<simgrid::simix::ActorImpl> actor)
+ simgrid::mc::ActorInformation* resolveActorInfo(simgrid::mc::RemotePtr<simgrid::kernel::actor::ActorImpl> actor)
{
xbt_assert(mc_model_checker != nullptr);
if (not actor)
}
/** Get a local copy of the SIMIX actor structure */
- simgrid::simix::ActorImpl* resolveActor(simgrid::mc::RemotePtr<simgrid::simix::ActorImpl> process)
+ simgrid::kernel::actor::ActorImpl* resolveActor(simgrid::mc::RemotePtr<simgrid::kernel::actor::ActorImpl> process)
{
simgrid::mc::ActorInformation* actor_info = this->resolveActorInfo(process);
if (actor_info)
void refresh_malloc_info();
void refresh_simix();
-private:
pid_t pid_ = -1;
Channel channel_;
bool running_ = false;
std::vector<s_stack_region_t> stack_areas_;
std::vector<IgnoredHeapRegion> ignored_heap_;
-public: // object info
+public:
+ // object info
// TODO, make private (first, objectify simgrid::mc::ObjectInformation*)
std::vector<std::shared_ptr<simgrid::mc::ObjectInformation>> object_infos;
std::shared_ptr<simgrid::mc::ObjectInformation> libsimgrid_info;
std::shared_ptr<simgrid::mc::ObjectInformation> binary_info;
-public: // Copies of MCed SMX data structures
- /** Copy of `simix_global->process_list`
- *
- * See mc_smx.c.
- */
+ // Copies of MCed SMX data structures
+ /** Copy of `simix_global->process_list`
+ *
+ * See mc_smx.c.
+ */
std::vector<ActorInformation> smx_actors_infos;
/** Copy of `simix_global->process_to_destroy`
*/
std::vector<malloc_info> heap_info;
-public: // Libunwind-data
- /** Full-featured MC-aware libunwind address space for the process
- *
- * This address space is using a simgrid::mc::UnwindContext*
- * (with simgrid::mc::Process* / simgrid::mc::AddressSpace*
- * and unw_context_t).
- */
+ // Libunwind-data
+ /** Full-featured MC-aware libunwind address space for the process
+ *
+ * This address space is using a simgrid::mc::UnwindContext*
+ * (with simgrid::mc::Process* / simgrid::mc::AddressSpace*
+ * and unw_context_t).
+ */
unw_addr_space_t unw_addr_space;
/** Underlying libunwind address-space