(path string)
| 444 | } |
| 445 | |
| 446 | func 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 | |
| 460 | var ( |
| 461 | hPageSizes []string |
no test coverage detected
searching dependent graphs…