From aeb36c5bb9f0e0813ac7c244c094abdcd967d622 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Salgado Date: Sun, 5 May 2024 14:37:32 +0200 Subject: gh-118518: Use the raw syscall directly for gettid (#118592) --- Python/perf_jit_trampoline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 #include // sysconf() #include // gettimeofday() +#include // ---------------------------------- // 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; -- cgit v0.12