pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: digoal <digoal@126.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8531: systemtap probe mark(checkpoint__done) error when i read the parameters
Date: Mon, 11 Nov 2013 08:20:58 +0800 (CST)
Message-ID: <1375a3fc.57e.14244886433.Coremail.digoal@126.com> (raw)
In-Reply-To: <3757.1384120490@sss.pgh.pa.us>
References: <E1VWLUK-0006Sa-Cg@wrigleys.postgresql.org>
	<20131017154754.GG9746@eldon.alvh.no-ip.org>
	<6a83c4c4.b731.141c8b73d47.Coremail.digoal@126.com>
	<20131018022515.GD4943@eldon.alvh.no-ip.org>
	<3757.1384120490@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

HI,
  Thanks tom lane.
  The stap 2.4 version has same problem, I need use @var("varname") get the value instead $argN.


[root@db-172-16-3-150 ~]# stap -V
Systemtap translator/driver (version 2.4/0.152, commit release-2.3-133-g335e342 + changes)
Copyright (C) 2005-2013 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: LIBSQLITE3 BOOST_SHARED_PTR TR1_UNORDERED_MAP NLS JAVA
[root@db-172-16-3-150 ~]# which stap
/opt/systemtap/bin/stap
[root@db-172-16-3-150 ~]# stap --vp 11111 -e '
> probe process("/home/pg93/pgsql9.3.1/bin/postgres").mark("checkpoint__done") {
>   println($$vars)
>   exit()
> }'
Pass 1: parsed user script and 96 library script(s) using 152024virt/25212res/2104shr/23932data kb, in 240usr/10sys/253real ms.
WARNING: Can't parse SDT_V3 operand 'CheckpointStats+40(%rip)': identifier '$$vars' at <input>:3:11
 source:   println($$vars)
                   ^
WARNING: Can't parse SDT_V3 operand 'NBuffers(%rip)': identifier '$$vars' at :3:11
 source:   println($$vars)
                   ^
WARNING: Can't parse SDT_V3 operand 'CheckpointStats+44(%rip)': identifier '$$vars' at :3:11
 source:   println($$vars)
                   ^
WARNING: Can't parse SDT_V3 operand 'CheckpointStats+48(%rip)': identifier '$$vars' at :3:11
 source:   println($$vars)
                   ^
WARNING: Can't parse SDT_V3 operand 'CheckpointStats+52(%rip)': identifier '$$vars' at :3:11
 source:   println($$vars)
                   ^
semantic error: unable to find local 'arg1', [man error::dwarf] dieoffset 0xd00f5 in /home/pg93/pgsql9.3.1/bin/postgres, near pc 0x4b9789 in CreateCheckPoint xlog.c (alternatives: $flags $shutdown $checkPoint $recptr $Insert $rdata $freespace $_logSegNo $vxids $nvxids $__func__): identifier '$$vars' at :3:11
        source:   println($$vars)
                          ^


semantic error: SDT asm not understood, requires debuginfo: identifier '$$vars' at :3:11
        source:   println($$vars)
                          ^


Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s) using 176172virt/32892res/5620shr/27852data kb, in 30usr/10sys/151real ms.
Pass 2: analysis failed.  [man error::pass2]


Use @var("varname") can get the value correct.
[root@db-172-16-3-150 ~]# stap --vp 11111 -e '
probe process("/home/pg93/pgsql9.3.1/bin/postgres").mark("checkpoint__done") {
  println(@var("NBuffers"))
  exit()
}'
Pass 1: parsed user script and 96 library script(s) using 152024virt/25212res/2104shr/23932data kb, in 240usr/20sys/254real ms.
Pass 2: analyzed script: 1 probe(s), 2 function(s), 0 embed(s), 0 global(s) using 175644virt/32208res/5524shr/27324data kb, in 30usr/0sys/36real ms.
Pass 3: translated to C into "/tmp/stap9yW3g4/stap_4e8bb94e54f595ef6f3e48aed9859200_1792_src.c" using 303812virt/32556res/5872shr/27324data kb, in 20usr/100sys/109real ms.
Pass 4: compiled C into "stap_4e8bb94e54f595ef6f3e48aed9859200_1792.ko" in 2290usr/410sys/2699real ms.
Pass 5: starting run.
2621440
Pass 5: run completed in 0usr/30sys/11089real ms.


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




At 2013-11-11 05:54:50,"Tom Lane" <tgl@sss.pgh.pa.us> wrote:
>Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>> digoal wrote:
>>> But the CHECKPOINT_DONE used in src have parameters:
>>> CheckpointStats.ckpt_bufs_written,
>>> NBuffers,
>>> CheckpointStats.ckpt_segs_added,
>>> CheckpointStats.ckpt_segs_removed,
>>> CheckpointStats.ckpt_segs_recycled
>
>> Uh, you're right.  I confused it with BUFFER_CHECKPOINT_DONE.
>
>> I have no useful answer for this right now.  The types of the parameters
>> appear correct, but that's as further as I checked.
>
>FWIW, I'd guess this is a bug in systemtap, and accordingly should be
>reported to those folk.  Try filing at bugzilla.redhat.com ... although
>they might tell you to try a supported systemtap release, which yours
>isn't AFAICT.  What I see on my RHEL6 box is systemtap-1.8-7.el6.x86_64
>and stap -V sez
>
>Systemtap translator/driver (version 1.8/0.152 non-git sources)
>Copyright (C) 2005-2012 Red Hat, Inc. and others
>This is free software; see the source for copying conditions.
>enabled features: AVAHI LIBRPM LIBSQLITE3 NSS TR1_UNORDERED_MAP NLS
>
>			regards, tom lane


view thread (7+ messages)

Message-ID: <1375a3fc.57e.14244886433.Coremail.digoal@126.com>
Permalink:  ../1375a3fc.57e.14244886433.Coremail.digoal@126.com/
Also on:    postgresql.org/message-id/1375a3fc.57e.14244886433.Coremail.digoal@126.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: digoal@126.com, tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com
  Subject: Re: BUG #8531: systemtap probe mark(checkpoint__done) error when i read the parameters
  In-Reply-To: <1375a3fc.57e.14244886433.Coremail.digoal@126.com>
  References: <E1VWLUK-0006Sa-Cg@wrigleys.postgresql.org> <20131017154754.GG9746@eldon.alvh.no-ip.org> <6a83c4c4.b731.141c8b73d47.Coremail.digoal@126.com> <20131018022515.GD4943@eldon.alvh.no-ip.org> <3757.1384120490@sss.pgh.pa.us> <1375a3fc.57e.14244886433.Coremail.digoal@126.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox