Re: Review: DTrace probes (merged version) ver_03 - Mailing list pgsql-hackers

From Robert Lor
Subject Re: Review: DTrace probes (merged version) ver_03
Date
Msg-id 4893752F.4080904@sun.com
Whole thread Raw
In response to Re: Review: DTrace probes (merged version) ver_03  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera wrote:
> Greg Smith wrote:
>   
>> One tiny change I'd suggest here:  if you look at the code for checkpoint 
>> buffer writing there are traces for two points in the process:
>>
>>  CheckPointBuffers(int flags)
>>  {
>> +       TRACE_POSTGRESQL_BUFFER_CHECKPOINT_START(flags);
>>         CheckpointStats.ckpt_write_t = GetCurrentTimestamp();
>>         BufferSync(flags);
>>         CheckpointStats.ckpt_sync_t = GetCurrentTimestamp();
>>         smgrsync();
>>         CheckpointStats.ckpt_sync_end_t = GetCurrentTimestamp();
>> +       TRACE_POSTGRESQL_BUFFER_CHECKPOINT_DONE();
>>  }
>>
>> Note how the existing code also tracks how long the sync phase took  
>> compared to the write one, and reports both numbers in the checkpoint  
>> logs.  It would be nice to add another probe at that same point (just  
>> after ckpt_sync_t is set) so that dtrace users could instrument all these 
>> possibilities as well:  just buffer write time/resources, just sync ones, 
>> or both.
>>     
>
> Sounds like the thing to do would be to pass CheckpointStats into the
> DONE probe.
>
>   

I like this approach as it avoids the need to have too many probes. I 
will make this change and get it in with the remaining probes for the 
next commit fest.

-- 
Robert Lor           Sun Microsystems
Austin, USA          http://sun.com/postgresql



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: SSL configure patch: review
Next
From: Thomas Hallgren
Date:
Subject: Re: [Pljava-dev] Should creating a new base type require superuser status?