Re: Additional DTrace Probes

From: Robert Lor <Robert(dot)Lor(at)Sun(dot)COM>
To: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
Cc: pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Additional DTrace Probes
Date: 2009-03-08 20:58:21
Message-ID: 49B4316D.3080605@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zdenek Kotala wrote:
> I tested your patch and it looks good. however I have several
> comments/questions:
>
> 1) probes contains pointer but in probe.h it is declared as int. Is it
> correct?
>

The probes cast the pointer to uintptr_t, so the correct type that will
work for both ILP32 and LP64 models is unsigned long. I've made the
correction from unsigned int to unsigned long. The reason uintptr_t is
not used in the probe definition is because it causes compilation
problem on Mac OS X. This is a known problem in the OS X's DTrace
implementation.
> 2) Maybe
>
> TRACE_POSTGRESQL_SLRU_READPAGE_PHYSICAL_DONE(true, -1, -1);
>
> would be better. Because slru_errcause, slru_errno can contains garbage
> in situation when everything goes fine. Same for write.
>

I've made the changes per your suggestion although one can argue that
the script can check arg0, and if it's true, avoid using arg1 and arg2
as they are meaningless.
>
> I think it is committable for 8.4.
>

That would be awesome!

-Robert

Attachment Content-Type Size
dtrace-probes-v2.patch text/plain 18.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Selena Deckelmann 2009-03-08 21:04:55 Re: pg_hba.conf - patch to report all parsing errors, and then bail
Previous Message Tom Lane 2009-03-08 20:34:12 Re: ERROR: "failed to locate grouping columns"