Re: [PATCH] dtrace probes for memory manager

From: fche(at)redhat(dot)com (Frank Ch(dot) Eigler)
To: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
Cc: Bernd Helmle <mailings(at)oopsware(dot)de>, Greg Smith <greg(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] dtrace probes for memory manager
Date: 2009-12-10 19:11:20
Message-ID: y0m8wdaabl3.fsf@fche.csb
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:

> [...]
> + header = (StandardChunkHeader *)
> + ((char *) ret - STANDARDCHUNKHEADERSIZE);
> +
> +// TRACE_POSTGRESQL_MCXT_ALLOC(context->name, context, size, header->size, true);
> +
> [...]

If the dormant overhead of these probes is measured or suspected to be
excessive, consider using the dtrace-generated per-probe foo_ENABLED()
conditional, or a postgres configuration global thusly:

if (__builtin_expect(TRACE_POSTGRESQL_MCXT_ALLOC_ENABLED(), 0))
TRACE_POSTGRESQL_MCXT_ALLOC(...);

so that the whole instrumentation parameter setup/call can be placed
out of the hot line with gcc -freorder-blocks.

- FChE

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2009-12-10 19:29:18 Re: tsearch parser inefficiency if text includes urls or emails - new version
Previous Message Andrew Dunstan 2009-12-10 19:08:13 Re: explain output infelicity in psql