Hi!

How do you profile backend? It complains about 'profile timer expired'
apparently due to waiting on socket. Maybe some compile option is 
missing or there is other trick?

-- 
Leon.
-------
He knows he'll never have to answer for any of his theories actually 
being put to test. If they were, they would be contaminated by reality.

Sun, 26 Sep 1999 01:43:14 +0500
Leon <leon@udmnet.ru>
Profiling?
Yes, I have done it many times.  I profile that postgres process, not
the backend.  Look for this in Makefile.global:

	# Comment out PROFILE to generate a profile version of the binaries
	#PROFILE= -p -non_shared


> Hi!
> 
> How do you profile backend? It complains about 'profile timer expired'
> apparently due to waiting on socket. Maybe some compile option is 
> missing or there is other trick?
> 
> -- 
> Leon.
> -------
> He knows he'll never have to answer for any of his theories actually 
> being put to test. If they were, they would be contaminated by reality.
> 
> ************
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Sun, 26 Sep 1999 20:25:58 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Profiling?
Bruce Momjian wrote:
> 
> Yes, I have done it many times.  I profile that postgres process, not
> the backend. 

Hmm, isn't Postgres process called backend process? AFAIK postmaster
(it's simply a nickname to Postgres) forks itself on receiveing new
connection request. Isn't it true? I mean that Postmaster is the same 
binary as Postgres itself.

> Look for this in Makefile.global:
> 
>         # Comment out PROFILE to generate a profile version of the binaries
>         #PROFILE= -p -non_shared
> 

Of course I used -p option. The problem is, when I start Postmaster,
it complains about 'profile timer expired'. What do I do wrong?

-- 
Leon.
-------
He knows he'll never have to answer for any of his theories actually 
being put to test. If they were, they would be contaminated by reality.


Mon, 27 Sep 1999 12:54:02 +0500
Leon <leon@udmnet.ru>
Re: [HACKERS] Profiling?
> Bruce Momjian wrote:
> > 
> > Yes, I have done it many times.  I profile that postgres process, not
> > the backend. 
> 
> Hmm, isn't Postgres process called backend process? AFAIK postmaster
> (it's simply a nickname to Postgres) forks itself on receiveing new
> connection request. Isn't it true? I mean that Postmaster is the same 
> binary as Postgres itself.

Yes.

> 
> > Look for this in Makefile.global:
> > 
> >         # Comment out PROFILE to generate a profile version of the binaries
> >         #PROFILE= -p -non_shared
> > 
> 
> Of course I used -p option. The problem is, when I start Postmaster,
> it complains about 'profile timer expired'. What do I do wrong?

That's strange.  I have not profiled in a while.  I wonder if the
removal of the exec() has caused this.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Mon, 27 Sep 1999 11:33:33 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Profiling?]
Bruce Momjian wrote:

> > >
> > >         # Comment out PROFILE to generate a profile version of the binaries
> > >         #PROFILE= -p -non_shared
> > >
> >
> > Of course I used -p option. The problem is, when I start Postmaster,
> > it complains about 'profile timer expired'. What do I do wrong?
> 
> That's strange.  I have not profiled in a while.  I wonder if the
> removal of the exec() has caused this.

BTW, gcc on Linux doesn't understand the option -non_shared. Maybe
that is the cause? In general, who and where should I talk to on 
that strange matter? Info and man seem not to say anything about it.

-- 
Leon.
-------
He knows he'll never have to answer for any of his theories actually 
being put to test. If they were, they would be contaminated by reality.


Mon, 27 Sep 1999 21:23:14 +0500
Leon <leon@udmnet.ru>
Re: [HACKERS] Profiling?]
Bruce Momjian <maillist@candle.pha.pa.us> writes:
>> Of course I used -p option. The problem is, when I start Postmaster,
>> it complains about 'profile timer expired'. What do I do wrong?

> That's strange.  I have not profiled in a while.  I wonder if the
> removal of the exec() has caused this.

I've done profiles successfully (with gcc -pg + gprof on HPUX) since
the exec change.  I think Leon is running into some sort of platform-
specific profiler bug, but I dunno how to get around it.

			regards, tom lane

Mon, 27 Sep 1999 19:37:43 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Profiling?] 