public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: systemtap@sources.redhat.com
Subject: container_of in systemtap scripts
Date: Mon, 18 Jan 2010 13:16:00 -0000	[thread overview]
Message-ID: <20100118131557.GA4127@basil.fritz.box> (raw)

Hi,

systemtap 1.1 works nicely.

But I find myself writing embedded C when I need container_of(), which 
is needed to access more and more data structures in the kernel.

The code to do that looks rather ugly unfortunately.

@cast doesn't support that. Are there any other clean ways
to write container_of() natively or are there plans to extend cast to include
an offset?

Thanks,

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

             reply	other threads:[~2010-01-18 13:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-18 13:16 Andi Kleen [this message]
2010-01-18 15:04 ` Frank Ch. Eigler
2010-01-18 19:55   ` Josh Stone
2010-01-18 20:39     ` Przemysław Pawełczyk
2010-01-19  9:21       ` Mark Wielaard
2010-01-19  9:53         ` Przemysław Pawełczyk
2010-01-19 12:41         ` Andi Kleen

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=20100118131557.GA4127@basil.fritz.box \
    --to=andi@firstfloor.org \
    --cc=systemtap@sources.redhat.com \
    /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).