-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-118518: Use the raw syscall directly for gettid #118592
Conversation
pablogsal
commented
May 5, 2024
•
edited by bedevere-app
bot
Loading
edited by bedevere-app
bot
- Issue: Allow perf to work without frame pointers #118518
!buildbot AMD64 RHEL8 |
🤖 New build scheduled with the buildbot fleet by @pablogsal for commit a08d6b4 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
@@ -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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it would make sense to leverage the existing thread API, e.g. PyThread_get_thread_native_id()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did that first but that has a check first for !initialized
that calls PyThread_init_thread
and that was causing problems when fork happens.