MCPcopy Create free account
hub / github.com/dmtcp/dmtcp / readMapsFromFile

Method readMapsFromFile

include/virtualidtable.h:308–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306 }
307
308 void readMapsFromFile(int fd)
309 {
310 string file = "/proc/self/fd/" + jalib::XToString(fd);
311 string mapFile = jalib::Filesystem::ResolveSymlink(file);
312
313 JASSERT(mapFile.length() > 0) (mapFile);
314 JTRACE("Read Maps from file") (mapFile);
315
316 // No need to lock the file as we are the only process using this fd.
317 // Util::lockFile(fd);
318 _do_lock_tbl();
319
320 jalib::JBinarySerializeReaderRaw maprd(mapFile, fd);
321 maprd.rewind();
322
323 while (!maprd.isEOF()) {
324 maprd & _idMapTable;
325 }
326
327 _do_unlock_tbl();
328
329 // Util::unlockFile(fd);
330
331 printMaps();
332 }
333
334 const string& getTypeStr()
335 {

Callers 1

pidVirt_PostRestartFunction · 0.80

Calls 5

XToStringFunction · 0.85
rewindMethod · 0.80
isEOFMethod · 0.80
_do_lock_tblFunction · 0.50
_do_unlock_tblFunction · 0.50

Tested by

no test coverage detected