Skip to content

Commit aeb36c5

Browse files
authored
gh-118518: Use the raw syscall directly for gettid (#118592)
1 parent aa61f8b commit aeb36c5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Python/perf_jit_trampoline.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <sys/types.h>
1414
#include <unistd.h> // sysconf()
1515
#include <sys/time.h> // gettimeofday()
16+
#include <sys/syscall.h>
1617

1718
// ----------------------------------
1819
// Perf jitdump API
@@ -575,7 +576,7 @@ static void perf_map_jit_write_entry(void *state, const void *code_addr,
575576
ev.base.size = sizeof(ev) + (name_length+1) + size;
576577
ev.base.time_stamp = get_current_monotonic_ticks();
577578
ev.process_id = getpid();
578-
ev.thread_id = gettid();
579+
ev.thread_id = syscall(SYS_gettid);
579580
ev.vma = base;
580581
ev.code_address = base;
581582
ev.code_size = size;

0 commit comments

Comments
 (0)