Skip to content

[swift-inspect] Fix taskToThread dictionary on watchOS. #41889

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

Merged
merged 1 commit into from
Mar 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ fileprivate class ConcurrencyDumper {
print("warning: unable to decode is-running state of target tasks, running state and async backtraces will not be printed")
}

let taskToThread: [swift_addr_t: swift_reflection_ptr_t] =
let taskToThread: [swift_addr_t: UInt64] =
Dictionary(threadCurrentTasks.map{ ($1, $0) }, uniquingKeysWith: { $1 })

var lastChilds: [Bool] = []
Expand Down Expand Up @@ -364,7 +364,7 @@ fileprivate class ConcurrencyDumper {
let flags = decodeTaskFlags(task)

output("Task \(hex: task.id) - flags=\(flags) enqueuePriority=\(hex: task.enqueuePriority) maxPriority=\(hex: task.maxPriority) address=\(hex: task.address)")
if let thread = taskToThread[task.address] {
if let thread = taskToThread[swift_addr_t(task.address)] {
output("current task on thread \(hex: thread)")
}
if let parent = task.parent {
Expand Down