You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to debug a concurrency problem in psycopg 3, namely the fact that thread don't seem to run in parallel as much as in psycopg 2. In py-spy flamegraphs of multithread runs I can see long spells of time spent trying to acquire the GIL after sections in which it was released.
What I need is to answer the question: "when thread t is locked on GIL acquisition, which thread has the control, and what is it doing?"
I have tried to use the speedgraph to answer this question. Unfortunately it seems that the startValue for each Profile is always 0:
As a consequence, two threads' profiles cannot be aligned precisely and the question of what a thread is doing cannot be answered consistently.
Would it be possible to set startValue either to the absolute start time of the thread, or to a relative time starting from the first thread start, so that the threads profiles can be aligned?
The text was updated successfully, but these errors were encountered:
Hello,
I am trying to debug a concurrency problem in psycopg 3, namely the fact that thread don't seem to run in parallel as much as in psycopg 2. In py-spy flamegraphs of multithread runs I can see long spells of time spent trying to acquire the GIL after sections in which it was released.
What I need is to answer the question: "when thread t is locked on GIL acquisition, which thread has the control, and what is it doing?"
I have tried to use the speedgraph to answer this question. Unfortunately it seems that the
startValue
for each Profile is always 0:https://github.com/benfred/py-spy/blob/master/src/speedscope.rs#L144
As a consequence, two threads' profiles cannot be aligned precisely and the question of what a thread is doing cannot be answered consistently.
Would it be possible to set startValue either to the absolute start time of the thread, or to a relative time starting from the first thread start, so that the threads profiles can be aligned?
The text was updated successfully, but these errors were encountered: