Getting list of held lwlocks from debugger

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Getting list of held lwlocks from debugger
Date: 2014-07-14 21:31:32
Message-ID: CAMkU=1yoBfbu0Ptkjv2N6L_7YbBD25bgD=y8DwiJsKOugRF5_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2014-07-14 21:34:48 Re: returning SETOF RECORD
Previous Message Alvaro Herrera 2014-07-14 20:48:09 Re: pg_shmem_allocations view