MCPcopy Create free account
hub / github.com/containerd/cgroups / readHugeTlbStats

Function readHugeTlbStats

cgroup2/utils.go:446–458  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

444}
445
446func readHugeTlbStats(path string) []*stats.HugeTlbStat {
447 hpSizes := hugePageSizes()
448 usage := make([]*stats.HugeTlbStat, len(hpSizes))
449 for idx, pagesize := range hpSizes {
450 usage[idx] = &stats.HugeTlbStat{
451 Max: getStatFileContentUint64(filepath.Join(path, "hugetlb."+pagesize+".max")),
452 Current: getStatFileContentUint64(filepath.Join(path, "hugetlb."+pagesize+".current")),
453 Pagesize: pagesize,
454 Failcnt: getKVStatsFileContentUint64(filepath.Join(path, "hugetlb."+pagesize+".events"), "max"),
455 }
456 }
457 return usage
458}
459
460var (
461 hPageSizes []string

Callers 1

StatFilteredMethod · 0.85

Calls 3

getStatFileContentUint64Function · 0.85
hugePageSizesFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…