Re: Generate call graphs in run-time

From: Joel Jacobson <joel(at)gluefinance(dot)com>
To: Jim Nasby <jim(at)nasby(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Generate call graphs in run-time
Date: 2012-01-10 09:12:33
Message-ID: CA+9pJHSzs-bmJPFS_OfpANerb-tV48ox-CekAfGAe1bR1zsh3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Is this only to print out the stack upon errors? Looks like the stack is in
the variable error_context_stack. Is it always available containing all the
parent functions, even when there is no error? Can I reach it from within
pgstat.c?

2012/1/10 Jim Nasby <jim(at)nasby(dot)net>

> On Jan 9, 2012, at 2:08 PM, Joel Jacobson wrote:
> > Generates call graphs of function calls within a transaction in run-time.
>
> Related to this... we had Command Prompt write a function for us that
> would spit out the complete call-graph of the current call stack whenever
> it was called. Alvaro didn't need to add any hooks to the backend to
> accomplish this, so it would seem that the call stack is already available.
> That might simplify what you're doing.
>
> I don't see this posted on pgFoundry yet, so I've attached it.
> --
> Jim C. Nasby, Database Architect jim(at)nasby(dot)net
> 512.569.9461 (cell) http://jim.nasby.net
>
>

--
Joel Jacobson
Trustly
+46703603801
https://trustly.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-01-10 09:16:35 Re: LWLOCK_STATS
Previous Message Simon Riggs 2012-01-10 09:07:37 Re: Page Checksums