Skip to content

Commit 9d5a5b1

Browse files
authored
Rebase on Async-Profiler 4.1 (#252)
* Update upstream lock for async-profiler 4.1 * Fix compilation breakage after update
1 parent ea198f1 commit 9d5a5b1

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

ddprof-lib/src/main/cpp/os.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class OS {
8484

8585
static void *safeAlloc(size_t size);
8686
static void safeFree(void *addr, size_t size);
87+
static int mprotect(void *addr, size_t len, int prot);
8788

8889
static bool getCpuDescription(char *buf, size_t size);
8990
static u64 getProcessCpuTime(u64 *utime, u64 *stime);

ddprof-lib/src/main/cpp/os_linux.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ void *OS::safeAlloc(size_t size) {
273273

274274
void OS::safeFree(void *addr, size_t size) { syscall(__NR_munmap, addr, size); }
275275

276+
int OS::mprotect(void *addr, size_t len, int prot) {
277+
return mprotect(addr, len, prot);
278+
}
279+
276280
bool OS::getCpuDescription(char *buf, size_t size) {
277281
int fd = open("/proc/cpuinfo", O_RDONLY);
278282
if (fd == -1) {

ddprof-lib/src/main/cpp/os_macos.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,10 @@ void *OS::safeAlloc(size_t size) {
260260

261261
void OS::safeFree(void *addr, size_t size) { munmap(addr, size); }
262262

263+
int OS::mprotect(void *addr, size_t len, int prot) {
264+
return mprotect(addr, len, prot);
265+
}
266+
263267
bool OS::getCpuDescription(char *buf, size_t size) {
264268
return sysctlbyname("machdep.cpu.brand_string", buf, &size, NULL, 0) == 0;
265269
}

gradle/ap-lock.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
branch=dd/master
2-
commit=87b7b42ec65be0a00a67e3f9451fb8e4d472b188
2+
commit=5930966a92860f6e5d2d89ab6faab5815720bad9

0 commit comments

Comments
 (0)