]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-136459: Use platform-specific type in perf_jit_trampoline (GH-137031)
authorPetr Viktorin <encukou@gmail.com>
Wed, 23 Jul 2025 08:20:42 +0000 (10:20 +0200)
committerGitHub <noreply@github.com>
Wed, 23 Jul 2025 08:20:42 +0000 (10:20 +0200)
gh-136461 added perf support for macOS, with ifdefs around all changes
except increasing thread_id to 64 bits.
Make that change Apple-specific too.

Python/perf_jit_trampoline.c

index 3dcbcd3400310227a665149f7fa54d7129727d9d..8732be973616d47cf61a1a63283103201c31d1f1 100644 (file)
@@ -214,7 +214,11 @@ struct BaseEvent {
 typedef struct {
     struct BaseEvent base;   // Common event header
     uint32_t process_id;     // Process ID where code was generated
+#if defined(__APPLE__)
     uint64_t thread_id;      // Thread ID where code was generated
+#else
+    uint32_t thread_id;      // Thread ID where code was generated
+#endif
     uint64_t vma;            // Virtual memory address where code is loaded
     uint64_t code_address;   // Address of the actual machine code
     uint64_t code_size;      // Size of the machine code in bytes