Rename gpu_mem.o to gpuMem.o

Underscore character may cause bpf prog/map naming collision. For
example, x.o with map y_z and x_y.o with map z both result in x_y_z
prog/map name, which should be prevented during compile-time.

aosp/2147825 will prohibit underscore character in bpf source name
(source name derives the obj name). Existing bpf modules with underscore
characters in source name need to be updated accordingly.

Bug: 236706995
Test: adb root; adb shell ls -l /sys/fs/bpf/ | grep gpuMem
Change-Id: I213624e59ce1bca6ee7c22028504f2d51e9c50df
This commit is contained in:
Ken Chen 2022-07-08 19:09:50 +08:00
parent 79f58c012d
commit 4c18e91f22
1 changed files with 1 additions and 1 deletions

View File

@ -1828,7 +1828,7 @@ static bool meminfo_parse_line(char *line, union meminfo *mi) {
static int64_t read_gpu_total_kb() {
static int fd = android::bpf::bpfFdGet(
"/sys/fs/bpf/map_gpu_mem_gpu_mem_total_map", BPF_F_RDONLY);
"/sys/fs/bpf/map_gpuMem_gpu_mem_total_map", BPF_F_RDONLY);
static constexpr uint64_t kBpfKeyGpuTotalUsage = 0;
uint64_t value;