Getting list of held lwlocks from debugger - Mailing list pgsql-hackers

From Jeff Janes
Subject Getting list of held lwlocks from debugger
Date
Msg-id CAMkU=1yoBfbu0Ptkjv2N6L_7YbBD25bgD=y8DwiJsKOugRF5_Q@mail.gmail.com
Whole thread Raw
Responses Re: Getting list of held lwlocks from debugger  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Is there an easy way to get a list of held lwlocks out of gdb attached to a core dump (or for that matter attached to a live process)?

I can try manually walking the internal data structure, but I am hoping for something analogous to the way you get memory contexts:

(gdb) p MemoryContextStats(TopMemoryContext)

Cheers,

Jeff

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pg_shmem_allocations view
Next
From: Andrew Dunstan
Date:
Subject: Re: returning SETOF RECORD