MCPcopy Create free account
hub / github.com/DataDrake/proc-maps / ParseMaps

Function ParseMaps

data/parser.go:52–64  ·  view source on GitHub ↗

ParseMaps gathers all of the file entries from every process

()

Source from the content-addressed store, hash-verified

50
51// ParseMaps gathers all of the file entries from every process
52func ParseMaps() EntryMap {
53 entries := make(EntryMap)
54 files, err := ioutil.ReadDir("/proc")
55 if err != nil {
56 log.Fatal(err)
57 }
58 for _, file := range files {
59 if file.IsDir() && pidMatch.MatchString(file.Name()) {
60 ParseMap(file.Name(), entries)
61 }
62 }
63 return entries
64}
65
66// ParseMap gets all of the entries for a specific map
67func ParseMap(pid string, entries EntryMap) {

Callers 2

FileStatsRunFunction · 0.92
RankAllSizesRunFunction · 0.92

Calls 1

ParseMapFunction · 0.85

Tested by

no test coverage detected