public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "Frank Ch. Eigler" <fche@redhat.com>
To: Craig Ringer <craig@2ndquadrant.com>
Cc: systemtap@sourceware.org
Subject: Re: Newbie Notes
Date: Thu, 07 Nov 2019 18:52:00 -0000	[thread overview]
Message-ID: <20191107185157.GA19461@redhat.com> (raw)
In-Reply-To: <CAMsr+YEJUuncM_XB2WM=gk9ja2MeaqYBj6swzjG=CnmmcPQtWw@mail.gmail.com>

Hi -


> OK. Take this script, which will work on anything you have lying around
> with simple adaptations:
> [...]

Ah.  Yes, the unused-variable warnings are suppressed, but only for
script located in a tapset.  If you put that first alias definition
into a separate directory/file, and run with stap -I$dir, then you
will not see those warnings.


> The issue is specifically within @var and @cast expansion. It's done early,
> and doesn't appear to benefit from implicit string concatenation at all,
> macro-expanded or otherwise. Per my other post.  [...]
> but not this (where $1 = /usr/pgsql-11/ ):
> 
>         @define PGBIN %( @1 "bin/postgres" %)
>         function get_pgver:long() {
>             return @var("server_version_num@guc.c", @PGBIN);
>         }
>         probe process(@PGBIN).function("PostgresMain") {
>             printf("%s", @PGBIN, get_pgver());
>         }

OK, working on this bug.


> [...] I'm talking about how --monitor decides what is / isn't a
> hit. Does using "next" in a probe alias body suppress it? etc.

It should count every distinct probe whose handler starts executing,
so definitely include those that run through to a 'next'.

> As a heavy user of perf's "perf top", stap's --monitor is of great interest
> to me.

By the way, see also   stap --example eventcount.stp 

> [...]


- FChE

  reply	other threads:[~2019-11-07 18:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28  7:19 Craig Ringer
2019-10-28  8:55 ` Craig Ringer
2019-10-30 20:10 ` Frank Ch. Eigler
2019-10-31 14:01   ` Craig Ringer
2019-11-07 18:52     ` Frank Ch. Eigler [this message]
2019-11-08  4:15       ` Craig Ringer
2019-11-08 12:03         ` Frank Ch. Eigler
2019-11-10  5:05           ` Craig Ringer

Reply instructions:

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

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

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191107185157.GA19461@redhat.com \
    --to=fche@redhat.com \
    --cc=craig@2ndquadrant.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).