This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
container_of in systemtap scripts
- From: Andi Kleen <andi at firstfloor dot org>
- To: systemtap at sources dot redhat dot com
- Date: Mon, 18 Jan 2010 14:15:57 +0100
- Subject: container_of in systemtap scripts
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.