Re: [PATCH v8 3/6] perf header: Support memory ranges
From: sashiko-bot@kernel.org
Date: 2026-09-10 19:58:54
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Missing explicit POSIX header inclusion `<fcntl.h>` for file control APIs. -- commit ae98e94438c4a105c55741f3c0be511c630d7250 Author: Thomas Falcon [off-list ref] perf header: Support memory ranges This commit introduces support for tracking memory ranges to monitor performance and resource control for different memory types. It parses data from ACPI MRRM tables exposed in sysfs and saves it in the perf data file header under HEADER_MEMORY_RANGES. Link: https://lore.kernel.org/lkml/20250505173819.419271-1-tony.luck@intel.com/ (local)
quoted hunk ↗ jump to hunk
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c
[ ... ]
quoted hunk ↗ jump to hunk
@@ -1892,6 +1893,132 @@ static int write_cpu_domain_info(struct feat_fd *ff, return ret; } +static int memory_range__read(struct memory_range *range, const char *path) +{ + char buf[32]; + ssize_t n; + int dfd, fd, tmp, ret = -1; + + dfd = open(path, O_RDONLY | O_DIRECTORY);
[Severity: Low] Does this missing explicit inclusion of <fcntl.h> for file control APIs (open, openat, O_RDONLY, O_DIRECTORY) cause build failures on musl libc systems? Without the explicit POSIX header inclusion, this might fail to compile on environments where <fcntl.h> isn't implicitly pulled in by other headers. -- Sashiko AI review · https://sashiko.dev/#/patchset/20260910194324.98002-1-thomas.falcon@intel.com?part=3