A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reduce dependency on ptrace.
[simgrid.git]
/
src
/
mc
/
remote
/
RemoteClient.hpp
diff --git
a/src/mc/remote/RemoteClient.hpp
b/src/mc/remote/RemoteClient.hpp
index
3f99f0e
..
b786aea
100644
(file)
--- a/
src/mc/remote/RemoteClient.hpp
+++ b/
src/mc/remote/RemoteClient.hpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2008-201
7
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2008-201
9
. 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. */
/* 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. */
@@
-6,37
+6,11
@@
#ifndef SIMGRID_MC_PROCESS_H
#define SIMGRID_MC_PROCESS_H
#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/inspect/ObjectInformation.hpp"
#include "src/mc/remote/Channel.hpp"
#include "src/mc/remote/Channel.hpp"
-#include "src/mc/remote/RemotePtr.hpp"
-
-#include "src/simix/popping_private.hpp"
-#include "src/simix/smx_private.hpp"
-#include <simgrid/simix.h>
-
-#include "src/xbt/memory_map.hpp"
+#include "src/xbt/mmalloc/mmprivate.h"
-#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 {
namespace simgrid {
namespace mc {
@@
-44,8
+18,8
@@
namespace mc {
class ActorInformation {
public:
/** MCed address of the process */
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;
/** Hostname (owned by `mc_modelchecker->hostnames`) */
const char* hostname = nullptr;
@@
-106,7
+80,7
@@
public:
RemoteClient& operator=(RemoteClient&&) = delete;
// Read memory:
RemoteClient& operator=(RemoteClient&&) = delete;
// Read memory:
- const void* read_bytes(void* buffer, std::size_t size, RemotePtr<void> address,
int process_index = ProcessIndexAny,
+ const void* read_bytes(void* buffer, std::size_t size, RemotePtr<void> address,
ReadOptions options = ReadOptions::none()) const override;
void read_variable(const char* name, void* target, size_t size) const;
ReadOptions options = ReadOptions::none()) const override;
void read_variable(const char* name, void* target, size_t size) const;
@@
-117,15
+91,12
@@
public:
template <class T> Remote<T> read_variable(const char* name) const
{
Remote<T> res;
template <class T> Remote<T> read_variable(const char* name) const
{
Remote<T> res;
- read_variable(name, res.get
B
uffer(), sizeof(T));
+ read_variable(name, res.get
_b
uffer(), sizeof(T));
return res;
}
std::string read_string(RemotePtr<char> address) const;
return res;
}
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);
// Write memory:
void write_bytes(const void* buffer, size_t len, RemotePtr<void> address);
@@
-136,7
+107,7
@@
public:
std::shared_ptr<simgrid::mc::ObjectInformation> find_object_info_exec(RemotePtr<void> addr) const;
std::shared_ptr<simgrid::mc::ObjectInformation> find_object_info_rw(RemotePtr<void> addr) const;
simgrid::mc::Frame* find_function(RemotePtr<void> ip) const;
std::shared_ptr<simgrid::mc::ObjectInformation> find_object_info_exec(RemotePtr<void> addr) const;
std::shared_ptr<simgrid::mc::ObjectInformation> find_object_info_rw(RemotePtr<void> addr) const;
simgrid::mc::Frame* find_function(RemotePtr<void> ip) const;
- simgrid::mc::Variable* find_variable(const char* name) const;
+
const
simgrid::mc::Variable* find_variable(const char* name) const;
// Heap access:
xbt_mheap_t get_heap()
// Heap access:
xbt_mheap_t get_heap()
@@
-154,8
+125,8
@@
public:
void clear_cache() { this->cache_flags_ = RemoteClient::cache_none; }
void clear_cache() { this->cache_flags_ = RemoteClient::cache_none; }
- Channel const& get
C
hannel() const { return channel_; }
- Channel& get
C
hannel() { return channel_; }
+ Channel const& get
_c
hannel() const { return channel_; }
+ Channel& get
_c
hannel() { return channel_; }
std::vector<IgnoredRegion> const& ignored_regions() const { return ignored_regions_; }
void ignore_region(std::uint64_t address, std::size_t size);
std::vector<IgnoredRegion> const& ignored_regions() const { return ignored_regions_; }
void ignore_region(std::uint64_t address, std::size_t size);
@@
-171,10
+142,6
@@
public:
void terminate() { running_ = false; }
void terminate() { running_ = false; }
- bool privatized(ObjectInformation const& info) const { return privatized_ && info.executable(); }
- bool privatized() const { return privatized_; }
- void privatized(bool privatized) { privatized_ = privatized; }
-
void ignore_global_variable(const char* name)
{
for (std::shared_ptr<simgrid::mc::ObjectInformation> const& info : this->object_infos)
void ignore_global_variable(const char* name)
{
for (std::shared_ptr<simgrid::mc::ObjectInformation> const& info : this->object_infos)
@@
-193,7
+160,7
@@
public:
std::vector<simgrid::mc::ActorInformation>& dead_actors();
/** Get a local description of a remote SIMIX actor */
std::vector<simgrid::mc::ActorInformation>& dead_actors();
/** Get a local description of a remote SIMIX actor */
- simgrid::mc::ActorInformation* resolve
ActorInfo(simgrid::mc::RemotePtr<simgrid::simix
::ActorImpl> actor)
+ simgrid::mc::ActorInformation* resolve
_actor_info(simgrid::mc::RemotePtr<simgrid::kernel::actor
::ActorImpl> actor)
{
xbt_assert(mc_model_checker != nullptr);
if (not actor)
{
xbt_assert(mc_model_checker != nullptr);
if (not actor)
@@
-209,16
+176,16
@@
public:
}
/** Get a local copy of the SIMIX actor structure */
}
/** Get a local copy of the SIMIX actor structure */
- simgrid::
simix::ActorImpl* resolveActor(simgrid::mc::RemotePtr<simgrid::simix
::ActorImpl> process)
+ simgrid::
kernel::actor::ActorImpl* resolve_actor(simgrid::mc::RemotePtr<simgrid::kernel::actor
::ActorImpl> process)
{
{
- simgrid::mc::ActorInformation* actor_info = this->resolve
ActorI
nfo(process);
+ simgrid::mc::ActorInformation* actor_info = this->resolve
_actor_i
nfo(process);
if (actor_info)
if (actor_info)
- return actor_info->copy.get
B
uffer();
+ return actor_info->copy.get
_b
uffer();
else
return nullptr;
}
else
return nullptr;
}
- void dump
S
tack();
+ void dump
_s
tack();
private:
void init_memory_map_info();
private:
void init_memory_map_info();
@@
-234,7
+201,6
@@
private:
RemotePtr<void> maestro_stack_end_;
int memory_file = -1;
std::vector<IgnoredRegion> ignored_regions_;
RemotePtr<void> maestro_stack_end_;
int memory_file = -1;
std::vector<IgnoredRegion> ignored_regions_;
- bool privatized_ = false;
std::vector<s_stack_region_t> stack_areas_;
std::vector<IgnoredHeapRegion> ignored_heap_;
std::vector<s_stack_region_t> stack_areas_;
std::vector<IgnoredHeapRegion> ignored_heap_;
@@
-252,7
+218,7
@@
public:
*/
std::vector<ActorInformation> smx_actors_infos;
*/
std::vector<ActorInformation> smx_actors_infos;
- /** Copy of `simix_global->
proces
s_to_destroy`
+ /** Copy of `simix_global->
actor
s_to_destroy`
*
* See mc_smx.c.
*/
*
* See mc_smx.c.
*/