Skip to content
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

Merged
merged 1 commit into from
May 5, 2024

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented May 5, 2024

@pablogsal
Copy link
Member Author

!buildbot AMD64 RHEL8

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @pablogsal for commit a08d6b4 🤖

The command will test the builders whose names match following regular expression: AMD64 RHEL8

The builders matched are:

  • AMD64 RHEL8 LTO PR
  • AMD64 RHEL8 FIPS Only Blake2 Builtin Hash PR
  • AMD64 RHEL8 FIPS No Builtin Hashes PR
  • AMD64 RHEL8 PR
  • AMD64 RHEL8 Refleaks PR
  • AMD64 RHEL8 LTO + PGO PR

@pablogsal pablogsal enabled auto-merge (squash) May 5, 2024 10:26
@pablogsal pablogsal merged commit aeb36c5 into python:main May 5, 2024
56 of 60 checks passed
@pablogsal pablogsal deleted the gettid branch May 5, 2024 12:37
@@ -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);
Copy link
Member

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()?

Copy link
Member Author

@pablogsal pablogsal May 6, 2024

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.

SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants