Skip to content

[RAI-46856] Add per-thread lock waiting time#275

Open
kpamnany wants to merge 3 commits intov1.10.2+RAIfrom
kp-codegen-lock-wt-metric
Open

[RAI-46856] Add per-thread lock waiting time#275
kpamnany wants to merge 3 commits intov1.10.2+RAIfrom
kp-codegen-lock-wt-metric

Conversation

@kpamnany
Copy link
Collaborator

PR Description

Alongside per-task lock waiting time. Also add an accessor for a thread's lock waiting time and also for a combined, all-threads lock waiting time.

Checklist

Requirements for merging:

  • I have opened an issue or PR upstream on JuliaLang/julia: <link to JuliaLang/julia>
  • I have removed the port-to-* labels that don't apply.
  • I have opened a PR on raicode to test these changes:

base/timing.jl Outdated
diff.malloc + diff.realloc + diff.poolalloc + diff.bigalloc
end

lock_waiting_time(tid::Int16) = ccall(:jl_get_thread_lock_waiting_time, UInt64, (Int16,), tid)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lock_waiting_time(tid::Int16) = ccall(:jl_get_thread_lock_waiting_time, UInt64, (Int16,), tid)
lock_waiting_time_ns(tid::Integer) = ccall(:jl_get_thread_lock_waiting_time, UInt64, (Int16,), convert(Int64, tid))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for convenience, so we can write lock_waiting_time_ns(1) rather than having to write lock_waiting_time_ns(Int16(1))

Alongside per-task lock waiting time. Also add an accessor for a
thread's lock waiting time and also for a combined, all-threads
lock waiting time.
@kpamnany kpamnany force-pushed the kp-codegen-lock-wt-metric branch from ecf1d65 to 60280a7 Compare February 19, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments