diff options
Diffstat (limited to 'chromium/patches/033-perfetto-get-thread-name.patch')
| -rw-r--r-- | chromium/patches/033-perfetto-get-thread-name.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/chromium/patches/033-perfetto-get-thread-name.patch b/chromium/patches/033-perfetto-get-thread-name.patch new file mode 100644 index 0000000..4014d1e --- /dev/null +++ b/chromium/patches/033-perfetto-get-thread-name.patch | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | --- a/third_party/perfetto/include/perfetto/ext/base/thread_utils.h | ||
| 2 | +++ b/third_party/perfetto/include/perfetto/ext/base/thread_utils.h | ||
| 3 | @@ -30,7 +30,8 @@ | ||
| 4 | #include <algorithm> | ||
| 5 | #endif | ||
| 6 | |||
| 7 | -#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) | ||
| 8 | +#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \ | ||
| 9 | + (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && !defined(__GLIBC__)) | ||
| 10 | #include <sys/prctl.h> | ||
| 11 | #endif | ||
| 12 | |||
| 13 | @@ -58,7 +59,8 @@ | ||
| 14 | |||
| 15 | inline bool GetThreadName(std::string& out_result) { | ||
| 16 | char buf[16] = {}; | ||
| 17 | -#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) | ||
| 18 | +#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \ | ||
| 19 | + (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && !defined(__GLIBC__)) | ||
| 20 | if (prctl(PR_GET_NAME, buf) != 0) | ||
| 21 | return false; | ||
| 22 | #else | ||