gh-118518: Use the raw syscall directly for gettid (#118592)

This commit is contained in:
Pablo Galindo Salgado 2024-05-05 14:37:32 +02:00 committed by GitHub
parent aa61f8bfcf
commit aeb36c5bb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;