Lines 1-5
Link Here
|
1 |
--- base/sampling_heap_profiler/sampling_heap_profiler.cc.orig 2019-06-04 18:55:15 UTC |
1 |
--- base/sampling_heap_profiler/sampling_heap_profiler.cc.orig 2019-06-13 09:11:51.000000000 +0200 |
2 |
+++ base/sampling_heap_profiler/sampling_heap_profiler.cc |
2 |
+++ base/sampling_heap_profiler/sampling_heap_profiler.cc 2019-06-14 21:28:04.089347000 +0200 |
3 |
@@ -30,6 +30,10 @@ |
3 |
@@ -30,6 +30,10 @@ |
4 |
#include <sys/prctl.h> |
4 |
#include <sys/prctl.h> |
5 |
#endif |
5 |
#endif |
Lines 11-22
Link Here
|
11 |
#if defined(OS_ANDROID) && BUILDFLAG(CAN_UNWIND_WITH_CFI_TABLE) && \ |
11 |
#if defined(OS_ANDROID) && BUILDFLAG(CAN_UNWIND_WITH_CFI_TABLE) && \ |
12 |
defined(OFFICIAL_BUILD) |
12 |
defined(OFFICIAL_BUILD) |
13 |
#include "base/trace_event/cfi_backtrace_android.h" |
13 |
#include "base/trace_event/cfi_backtrace_android.h" |
14 |
@@ -65,6 +69,10 @@ const char* GetAndLeakThreadName() { |
14 |
@@ -65,6 +69,10 @@ |
15 |
#elif defined(OS_MACOSX) |
15 |
#elif defined(OS_MACOSX) |
16 |
int err = pthread_getname_np(pthread_self(), name, kBufferLen); |
16 |
int err = pthread_getname_np(pthread_self(), name, kBufferLen); |
17 |
if (err == 0 && *name != '\0') |
17 |
if (err == 0 && *name != '\0') |
18 |
+ return strdup(name); |
18 |
+ return strdup(name); |
19 |
+#elif defined(OS_BSD) |
19 |
+#elif defined(OS_BSD) && defined(HAVE_PTHREAD_GET_NAME_NP) |
20 |
+ pthread_get_name_np(pthread_self(), name, kBufferLen); |
20 |
+ pthread_get_name_np(pthread_self(), name, kBufferLen); |
21 |
+ if (*name != '\0') |
21 |
+ if (*name != '\0') |
22 |
return strdup(name); |
22 |
return strdup(name); |