public inbox for
 help / color / mirror / Atom feed
From: Nir Soffer <>
To: "Frank Ch. Eigler" <>
Cc:, David Teigland <>
Subject: Re: [PATCH] Fix traceaio with IO_CMD_{PREAD,PWRITE}
Date: Wed, 29 Sep 2021 12:14:40 +0300	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Fri, Sep 24, 2021 at 2:00 AM Frank Ch. Eigler <> wrote:
> Hi -
> > This works:
> >
> > global IO_CMD_PREADV = 7
> > global IO_CMD_PWRITEV = 8
> >
> > Do we have a better way to handle this?
> Within a tapset snippet, code can use
>    @const("IO_CMD_PREADV")
> referring to an identifier in embedded-C scope.

This works, bug require -g in stap script. I don't think it makes sense
to require Guru mode just to access an enum. It would be nice it this
could work without -g, since accessing constants seems to be a safe

> If the IO_CMD_PREADV identifier were an enum value that shows up in
> DWARF, then $IO_CMD_PREADV can resolve in recent versions of stap.

I could not find the enum in debuginfo files or in stap -L output, but maybe
I was not using the right tool for this.

In a test program using libaio, I cannot find the enum values in the symbols
so I guess this info is not available.

> If none of the above, yeah, use the global gadget.

I sent v2 using globals.


      reply	other threads:[~2021-09-29  9:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-23 17:49 Nir Soffer
2021-09-23 22:21 ` Nir Soffer
2021-09-23 23:00   ` Frank Ch. Eigler
2021-09-29  9:14     ` Nir Soffer [this message]

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:

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

  git send-email \ \ \ \ \ \

* 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).