-/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2023. 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. */
/** Ignored data
*
- * Some parts of the snapshot are ignored by zeroing them out: the real
- * values is stored here.
- * */
+ * Some parts of the snapshot are ignored by zeroing them out: the real values is stored here.
+ */
struct s_mc_snapshot_ignored_data_t {
void* start;
std::vector<char> data;
namespace simgrid::mc {
+using hash_type = std::uint64_t;
+
class XBT_PRIVATE Snapshot final : public AddressSpace {
public:
/* Initialization */
Region* get_region(const void* addr, Region* hinted_region) const;
void restore(RemoteProcess* process) const;
+ bool operator==(const Snapshot& other);
+ bool operator!=(const Snapshot& other) { return not(*this == other); }
+
// To be private
long num_state_;
std::size_t heap_bytes_used_ = 0;
std::vector<std::unique_ptr<Region>> snapshot_regions_;
- std::set<pid_t> enabled_processes_;
std::vector<std::size_t> stack_sizes_;
std::vector<s_mc_snapshot_stack_t> stacks_;
std::vector<simgrid::mc::IgnoredHeapRegion> to_ignore_;
void add_region(RegionType type, ObjectInformation* object_info, void* start_addr, std::size_t size);
void snapshot_regions(RemoteProcess* process);
void snapshot_stacks(RemoteProcess* process);
+ void handle_ignore();
+ void ignore_restore() const;
+ hash_type do_hash() const;
};
} // namespace simgrid::mc