https://github.com/python/cpython/commit/aeb36c5bb9f0e0813ac7c244c094abdcd967d622
commit: aeb36c5bb9f0e0813ac7c244c094abdcd967d622
branch: main
author: Pablo Galindo Salgado <[email protected]>
committer: pablogsal <[email protected]>
date: 2024-05-05T12:37:32Z
summary:
gh-118518: Use the raw syscall directly for gettid (#118592)
files:
M Python/perf_jit_trampoline.c
diff --git a/Python/perf_jit_trampoline.c b/Python/perf_jit_trampoline.c
index fdce0da3eded72..23478c6d469c2b 100644
--- a/Python/perf_jit_trampoline.c
+++ b/Python/perf_jit_trampoline.c
@@ -13,6 +13,7 @@
#include <sys/types.h>
#include <unistd.h> // sysconf()
#include <sys/time.h> // gettimeofday()
+#include <sys/syscall.h>
// ----------------------------------
// Perf jitdump API
@@ -575,7 +576,7 @@ static void perf_map_jit_write_entry(void *state, const
void *code_addr,
ev.base.size = sizeof(ev) + (name_length+1) + size;
ev.base.time_stamp = get_current_monotonic_ticks();
ev.process_id = getpid();
- ev.thread_id = gettid();
+ ev.thread_id = syscall(SYS_gettid);
ev.vma = base;
ev.code_address = base;
ev.code_size = size;
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]