From 6296d1985c73f7c99d552429cd305b568d20b944 Mon Sep 17 00:00:00 2001 From: Jaroslav Bachorik Date: Wed, 23 Jul 2025 08:19:28 +0200 Subject: [PATCH 1/2] Update upstream lock for async-profiler 4.1 --- gradle/ap-lock.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/ap-lock.properties b/gradle/ap-lock.properties index 62c8ba03..84c17186 100644 --- a/gradle/ap-lock.properties +++ b/gradle/ap-lock.properties @@ -1,2 +1,2 @@ branch=dd/master -commit=87b7b42ec65be0a00a67e3f9451fb8e4d472b188 \ No newline at end of file +commit=5930966a92860f6e5d2d89ab6faab5815720bad9 \ No newline at end of file From 20963d94d2421bbb52bb13d1eaeb1195aacb5f4d Mon Sep 17 00:00:00 2001 From: Jaroslav Bachorik Date: Wed, 23 Jul 2025 08:19:40 +0200 Subject: [PATCH 2/2] Fix compilation breakage after update --- ddprof-lib/src/main/cpp/os.h | 1 + ddprof-lib/src/main/cpp/os_linux.cpp | 4 ++++ ddprof-lib/src/main/cpp/os_macos.cpp | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/ddprof-lib/src/main/cpp/os.h b/ddprof-lib/src/main/cpp/os.h index f335bc87..143abbb3 100644 --- a/ddprof-lib/src/main/cpp/os.h +++ b/ddprof-lib/src/main/cpp/os.h @@ -84,6 +84,7 @@ class OS { static void *safeAlloc(size_t size); static void safeFree(void *addr, size_t size); + static int mprotect(void *addr, size_t len, int prot); static bool getCpuDescription(char *buf, size_t size); static u64 getProcessCpuTime(u64 *utime, u64 *stime); diff --git a/ddprof-lib/src/main/cpp/os_linux.cpp b/ddprof-lib/src/main/cpp/os_linux.cpp index 1d224123..03adb4cc 100644 --- a/ddprof-lib/src/main/cpp/os_linux.cpp +++ b/ddprof-lib/src/main/cpp/os_linux.cpp @@ -273,6 +273,10 @@ void *OS::safeAlloc(size_t size) { void OS::safeFree(void *addr, size_t size) { syscall(__NR_munmap, addr, size); } +int OS::mprotect(void *addr, size_t len, int prot) { + return mprotect(addr, len, prot); +} + bool OS::getCpuDescription(char *buf, size_t size) { int fd = open("/proc/cpuinfo", O_RDONLY); if (fd == -1) { diff --git a/ddprof-lib/src/main/cpp/os_macos.cpp b/ddprof-lib/src/main/cpp/os_macos.cpp index 632a5d3f..9098fe59 100644 --- a/ddprof-lib/src/main/cpp/os_macos.cpp +++ b/ddprof-lib/src/main/cpp/os_macos.cpp @@ -260,6 +260,10 @@ void *OS::safeAlloc(size_t size) { void OS::safeFree(void *addr, size_t size) { munmap(addr, size); } +int OS::mprotect(void *addr, size_t len, int prot) { + return mprotect(addr, len, prot); +} + bool OS::getCpuDescription(char *buf, size_t size) { return sysctlbyname("machdep.cpu.brand_string", buf, &size, NULL, 0) == 0; }