mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-141645: Add a TUI mode to the new tachyon profiler (#141646)
This commit is contained in:
parent
e90061f5f1
commit
b3383085f9
17 changed files with 5519 additions and 60 deletions
|
|
@ -2761,7 +2761,13 @@ unwind_stack_for_thread(
|
|||
|
||||
// Check CPU status
|
||||
long pthread_id = GET_MEMBER(long, ts, unwinder->debug_offsets.thread_state.thread_id);
|
||||
int cpu_status = get_thread_status(unwinder, tid, pthread_id);
|
||||
|
||||
// Optimization: only check CPU status if needed by mode because it's expensive
|
||||
int cpu_status = -1;
|
||||
if (unwinder->mode == PROFILING_MODE_CPU || unwinder->mode == PROFILING_MODE_ALL) {
|
||||
cpu_status = get_thread_status(unwinder, tid, pthread_id);
|
||||
}
|
||||
|
||||
if (cpu_status == -1) {
|
||||
status_flags |= THREAD_STATUS_UNKNOWN;
|
||||
} else if (cpu_status == THREAD_STATE_RUNNING) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue