• Misha Shneerson's avatar
    snapshot rootID at the same time as we snapshot callstacks · c0f5b564
    Misha Shneerson authored
    Summary:
    D19417574 added support for snapshotting stack traces for threads our requests are running on. The problem with this approach was that we are racing - stack trace may be recorded AFTER requests has already left the thread. Hence we might be presenting incorrect and confusing picture to the users.
    
    Here we make sure that request root id and stack trace are recorded together, and there is no race.
    
    Because we are using interrupts to get on the thread, sometimes we might not be able to record the information using this approach. We then fallback to the previous way of associating threads and requests (by walking TLS entries).
    
    (Note: this ignores all push blocking failures!)
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D19445100
    
    fbshipit-source-id: 4311f4e521a48852bf99aede03814de0941c7814
    c0f5b564
Request.h 17.6 KB