diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2024-05-05 12:37:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-05 12:37:32 (GMT) |
commit | aeb36c5bb9f0e0813ac7c244c094abdcd967d622 (patch) | |
tree | 8212e8eb287e93219c955dba52eb7b73166abb04 /Python/perf_jit_trampoline.c | |
parent | aa61f8bfcf2584dd8345f1f9a07e240100b79192 (diff) | |
download | cpython-aeb36c5bb9f0e0813ac7c244c094abdcd967d622.zip cpython-aeb36c5bb9f0e0813ac7c244c094abdcd967d622.tar.gz cpython-aeb36c5bb9f0e0813ac7c244c094abdcd967d622.tar.bz2 |
gh-118518: Use the raw syscall directly for gettid (#118592)
Diffstat (limited to 'Python/perf_jit_trampoline.c')
-rw-r--r-- | Python/perf_jit_trampoline.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/perf_jit_trampoline.c b/Python/perf_jit_trampoline.c index fdce0da..23478c6 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; |