X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/001a3a254b6d75c98078930049e6bdd8b3ecf3f8..c7827e5b1b4c8c883b0a58155b030743ea8f4d79:/src/mc/sosp/RemoteProcessMemory.hpp diff --git a/src/mc/sosp/RemoteProcessMemory.hpp b/src/mc/sosp/RemoteProcessMemory.hpp index 7cc058adf8..0643a58e4b 100644 --- a/src/mc/sosp/RemoteProcessMemory.hpp +++ b/src/mc/sosp/RemoteProcessMemory.hpp @@ -20,24 +20,6 @@ namespace simgrid::mc { -class ActorInformation { -public: - /** MCed address of the process */ - RemotePtr address{nullptr}; - Remote copy; - - /** Hostname (owned by `mc_model_checker->hostnames_`) */ - const std::string* hostname = nullptr; - std::string name; - - void clear() - { - name.clear(); - address = nullptr; - hostname = nullptr; - } -}; - struct IgnoredRegion { std::uint64_t addr; std::size_t size; @@ -50,14 +32,14 @@ struct IgnoredHeapRegion { std::size_t size; }; -/** The Application's process memory, seen from the Checker perspective - * - * Responsibilities: +/** The Application's process memory, seen from the Checker perspective. This class is not needed if you don't need to + * introspect the application process. * - * - reading from the process memory (`AddressSpace`); - * - accessing the system state of the process (heap, …); - * - stack unwinding; - * - etc. + * Responsabilities: + * - reading from the process memory (`AddressSpace`); + * - accessing the system state of the process (heap, …); + * - stack unwinding; + * - etc. */ class RemoteProcessMemory final : public AddressSpace { private: @@ -68,9 +50,8 @@ private: static constexpr int cache_malloc = 2; public: - explicit RemoteProcessMemory(pid_t pid); + explicit RemoteProcessMemory(pid_t pid, xbt_mheap_t mmalloc_default_mdp); ~RemoteProcessMemory() override; - void init(xbt_mheap_t mmalloc_default_mdp); RemoteProcessMemory(RemoteProcessMemory const&) = delete; RemoteProcessMemory(RemoteProcessMemory&&) = delete; @@ -114,8 +95,8 @@ public: // Heap access: xbt_mheap_t get_heap() { - if (not(this->cache_flags_ & RemoteProcessMemory::cache_heap)) - this->refresh_heap(); + if (not(cache_flags_ & RemoteProcessMemory::cache_heap)) + refresh_heap(); return this->heap.get(); } const malloc_info* get_malloc_info() @@ -131,18 +112,13 @@ public: std::vector const& ignored_regions() const { return ignored_regions_; } void ignore_region(std::uint64_t address, std::size_t size); - - pid_t pid() const { return pid_; } + void unignore_region(std::uint64_t address, std::size_t size); bool in_maestro_stack(RemotePtr p) const { return p >= this->maestro_stack_start_ && p < this->maestro_stack_end_; } - bool running() const { return running_; } - - void terminate() { running_ = false; } - void ignore_global_variable(const char* name) const { for (std::shared_ptr const& info : this->object_infos) @@ -165,8 +141,7 @@ private: void refresh_heap(); void refresh_malloc_info(); - pid_t pid_ = -1; - bool running_ = false; + pid_t pid_ = -1; std::vector memory_map_; RemotePtr maestro_stack_start_; RemotePtr maestro_stack_end_;