Skip to content

Commit

Permalink
pythongh-118518: Use the raw syscall directly for gettid (python#118592)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogsal authored and SonicField committed May 8, 2024
1 parent bc1fc56 commit cb20391
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Python/perf_jit_trampoline.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <sys/types.h>
#include <unistd.h> // sysconf()
#include <sys/time.h> // gettimeofday()
#include <sys/syscall.h>

// ----------------------------------
// Perf jitdump API
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit cb20391

Please sign in to comment.