Skip to content

Commit ea7b98c

Browse files
committed
fixup! fixup! fixup! gh-138709: Implement CPU time profiling in profiling.sample
1 parent 77727eb commit ea7b98c

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

Modules/_remote_debugging_module.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,12 +2498,6 @@ static int
24982498
get_thread_status(RemoteUnwinderObject *unwinder, uint64_t tid, uint64_t pthread_id) {
24992499
#ifdef __APPLE__
25002500
if (unwinder->thread_id_offset == 0) {
2501-
// Apple is a bit of a circus and doesn't give us a straightforward way to get thread information
2502-
// given a TID. What is worse is that the only way to get thread information is calling proc_pidinfo
2503-
// with some number obtained from a previous call to proc_pidinfo with PROC_PIDLISTTHREADS. But even
2504-
// after that sacrifice there is no way to know what TID or pthread id corresponds to what number.
2505-
// There is a constant offset between the pthread id and the number returned by proc_pidinfo so we only
2506-
// need to find it once.
25072501
uint64_t *tids = (uint64_t *)PyMem_Malloc(MAX_NATIVE_THREADS * sizeof(uint64_t));
25082502
if (!tids) {
25092503
PyErr_NoMemory();

0 commit comments

Comments
 (0)