Re: [PATCH] dtrace probes for memory manager

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Bernd Helmle <mailings(at)oopsware(dot)de>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Greg Smith <greg(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] dtrace probes for memory manager
Date: 2009-12-11 20:00:50
Message-ID: 1260561650.2642.61.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane píše v pá 11. 12. 2009 v 13:56 -0500:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > As far as I am concerned that is way too much, particularly
> > considering that your test case isn't designed to be particularly
> > memory-allocation intensive, and if it is up to me I will reject this.
> > Even a quarter-percent slowdown for a feature that will be used only
> > by a small fraction of users only a small fraction of time time seems
> > totally unacceptable to me.
>
> It seems to me that anyone who really needs this can instrument the
> alloc functions anyway --- isn't one of the features of DTrace supposed
> to be that you can monitor calls to a particular function without any
> prearranged code support? Or is that one of the things like "zero
> overhead" that turns out to be more marketing-speak than reality?

There are several types of probes. For example for PID provider probes
you can monitor all entry and return point from global function. And
also you can put probe on each asm instruction in the function. These
probes have zero overhead, because dtrace understand ABI and know where
args are. Unfortunately user defined probes has small overhead which is
price for universal solution which works with all compilers and linkers.

> Anyway I concur with Robert's opinion that the use-case is far too small
> to justify incurring a measurable overhead for everybody.

OK.

> There might
> be some small argument for putting these in under an extra #ifdef, but
> they wouldn't get into any regular production build.

unfortunately #ifdef solution kills main dtrace goal - without
recompilation :(.

Zdenek

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-12-11 20:03:28 Re: Adding support for SE-Linux security
Previous Message Tom Lane 2009-12-11 19:56:33 Re: thread safety on clients