X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1679193978528bbb628e0f3a7853cddf4f3cfe0d..c99859aeca9cb0d4ebec395052bdd8a4ef38fcfd:/src/mc/Process.cpp diff --git a/src/mc/Process.cpp b/src/mc/Process.cpp index 0f4a0b0d87..ee5df35082 100644 --- a/src/mc/Process.cpp +++ b/src/mc/Process.cpp @@ -55,9 +55,22 @@ namespace mc { #define SO_RE "\\.so[\\.0-9]*$" #define VERSION_RE "-[\\.0-9-]*$" -// In lexicographic order (but this is currently not used in the code): +// List of library which memory segments are not considered: static const char *const filtered_libraries[] = { +#ifdef __linux__ "ld", +#elif defined __FreeBSD__ + "ld-elf", + "ld-elf32", + "libkvm", /* kernel data access library */ + "libprocstat", /* process and file information retrieval */ + "libthr", /* thread library */ + "libutil", +#endif + "libasan", /* gcc sanitizers */ + "libargp", /* workarounds for glibc-less systems */ + "libtsan", + "libubsan", "libbz2", "libboost_chrono", "libboost_context", @@ -67,9 +80,11 @@ static const char *const filtered_libraries[] = { "libc++", "libcdt", "libcgraph", + "libcxxrt", "libdl", "libdw", "libelf", + "libevent", "libgcc_s", "liblua5.1", "liblua5.3", @@ -241,7 +256,7 @@ Process::~Process() /** Refresh the information about the process * - * Do not use direclty, this is used by the getters when appropriate + * Do not use directly, this is used by the getters when appropriate * in order to have fresh data. */ void Process::refresh_heap() @@ -345,7 +360,7 @@ void Process::init_memory_map_info() regfree(&res.so_re); regfree(&res.version_re); - // Resolve time (including accross differents objects): + // Resolve time (including across different objects): for (auto const& object_info : this->object_infos) postProcessObjectInformation(this, object_info.get()); @@ -388,14 +403,14 @@ simgrid::mc::Frame* Process::find_function(RemotePtr ip) const return info ? info->find_function((void*) ip.address()) : nullptr; } -/** Find (one occurence of) the named variable definition +/** Find (one occurrence of) the named variable definition */ simgrid::mc::Variable* Process::find_variable(const char* name) const { // First lookup the variable in the executable shared object. // A global variable used directly by the executable code from a library // is reinstanciated in the executable memory .data/.bss. - // We need to look up the variable in the execvutable first. + // We need to look up the variable in the executable first. if (this->binary_info) { std::shared_ptr const& info = this->binary_info; simgrid::mc::Variable* var = info->find_variable(name); @@ -479,7 +494,7 @@ const void *Process::read_bytes(void* buffer, std::size_t size, mc_model_checker->process().read( remote(remote_smpi_privatisation_regions + process_index)); - // Address translation in the privaization segment: + // Address translation in the privatization segment: size_t offset = address.address() - (std::uint64_t)info->start_rw; address = remote((char*)privatisation_region.address + offset); } @@ -646,7 +661,7 @@ std::vector& Process::old_simix_processes( void Process::dumpStack() { - unw_addr_space_t as = unw_create_addr_space(&_UPT_accessors, __BYTE_ORDER); + unw_addr_space_t as = unw_create_addr_space(&_UPT_accessors, BYTE_ORDER); if (as == nullptr) { XBT_ERROR("Could not initialize ptrace address space"); return;