From: Pablo Galindo Salgado Date: Sun, 5 May 2024 12:37:32 +0000 (+0200) Subject: gh-118518: Use the raw syscall directly for gettid (#118592) X-Git-Tag: v3.13.0b1~97 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aeb36c5bb9f0e0813ac7c244c094abdcd967d622;p=thirdparty%2FPython%2Fcpython.git gh-118518: Use the raw syscall directly for gettid (#118592) --- diff --git a/Python/perf_jit_trampoline.c b/Python/perf_jit_trampoline.c index fdce0da3eded..23478c6d469c 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;