Re: BUG #8531: systemtap probe mark(checkpoint__done) error when i read the parameters

From: digoal <digoal(at)126(dot)com>
To: "Alvaro Herrera" <alvherre(at)2ndquadrant(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8531: systemtap probe mark(checkpoint__done) error when i read the parameters
Date: 2013-10-18 02:27:11
Message-ID: 6721c176.1b6b1.141c96353e7.Coremail.digoal@126.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

HI,
I use the two method below get values from probes it.

int v1,v2,v3,v4,vnb;
vnb =NBuffers;
v1 =CheckpointStats.ckpt_bufs_written;
v2 =CheckpointStats.ckpt_segs_added;
v3 =CheckpointStats.ckpt_segs_removed;
v4 =CheckpointStats.ckpt_segs_recycled;

TRACE_POSTGRESQL_CHECKPOINT_DONE(v1,
vnb,
v2,
v3,
v4);

this method cann't output the NBuffers value.
[root(at)db-172-16-3-150~]# stap -D MAXSTRINGLEN=100000 --vp 10000 -e 'probe process("/home/pg93/pgsql9.3.1/bin/postgres").mark("checkpoint__done") {println($$locals$$)}'
Pass 1: parsed user script and 96 library script(s) using 152048virt/25252res/2116shr/23956data kb, in 230usr/10sys/252real ms.
shutdown=? checkPoint={.redo=26648020808, .ThisTimeLineID=1, .PrevTimeLineID=1, .fullPageWrites='\001', .nextXidEpoch=0, .nextXid=130667532, .nextOid=57479, .nextMulti=1, .nextMultiOffset=0, .oldestXid=1800, .oldestXidDB=1, .oldestMulti=1, .oldestMultiDB=1, .time=1382057407, .oldestActiveXid=130667532} recptr=26648020968 Insert={.PrevRecord=26648020864, .curridx=886, .currpage=0x7f6ca01fc000, .currpos="", .RedoRecPtr=26648020808, .forcePageWrites='\000', .fullPageWrites='\001', .exclusiveBackup='\000', .nonExclusiveBackups=0, .lastBackupStart=0} rdata={.data="H?X4", .len=72, .buffer=0, .buffer_std='\001', .next=0x0} freespace=? _logSegNo=? vxids={.backendId=?, .localTransactionId=?} nvxids=0 __func__="CreateCheckPoint" v1=0 v2=0 v3=0 v4=0 vnb=?

the second method:
[root(at)db-172-16-3-150~]# stap -D MAXSTRINGLEN=100000 --vp 10000 -e '
probe process("/home/pg93/pgsql9.3.1/bin/postgres").mark("checkpoint__done") {
printf("ckpt_bufs_written:%d, ckpt_segs_added:%d, ckpt_segs_removed:%d, ckpt_segs_recycled:%d, NBuffers:%d\n", @var("CheckpointStats")->ckpt_bufs_written, @var("CheckpointStats")->ckpt_segs_added, @var("CheckpointStats")->ckpt_segs_removed, @var("CheckpointStats")->ckpt_segs_recycled, @var("NBuffers"))
}'
Pass 1: parsed user script and 96 library script(s) using 151984virt/25256res/2116shr/23892data kb, in 240usr/20sys/251real ms.
ckpt_bufs_written:0, ckpt_segs_added:0, ckpt_segs_removed:0, ckpt_segs_recycled:0, NBuffers:262144
ckpt_bufs_written:0, ckpt_segs_added:0, ckpt_segs_removed:0, ckpt_segs_recycled:0, NBuffers:262144

--
公益是一辈子的事,I'm Digoal,Just Do It.

At 2013-10-17 23:47:54,"Alvaro Herrera" <alvherre(at)2ndquadrant(dot)com> wrote:
>digoal(at)126(dot)com wrote:
>
>> When i probe checkpoint__done, and read the parameters , it's error:
>
>CHECKPOINT_DONE doesn't have parameters. It works for CHECKPOINT_START
>because that one has one parameter.
>
>--
>Álvaro Herrera http://www.2ndQuadrant.com/
>PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Honza Horak 2013-10-18 11:55:09 random() generates collisions too early
Previous Message Alvaro Herrera 2013-10-18 02:25:15 Re: BUG #8531: systemtap probe mark(checkpoint__done) error when i read the parameters