This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] Fix sematic error: empty struct
- From: James Bottomley <James dot Bottomley at HansenPartnership dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: Fri, 27 Jun 2008 14:11:28 -0500
- Subject: Re: [PATCH] Fix sematic error: empty struct
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=2007; t=1214593890; bh=qkML6f2GoSUtGkHr+hHGThhFQnQ3XjkddcCK14hwTw E=; l=1135; h=Subject:From:To:Cc:In-Reply-To:References: Content-Type:Date:Message-Id:Mime-Version: Content-Transfer-Encoding; b=BC9FTrHF4s/2JlYCAKRJjNEVk5hJCp1eTpKis FztiHZauolgt0dxUj/YtYNj5CrMQTQANXDPI7RtbZv0DqnO9uMvgwhJX+L1PIU08G8x 8ex2z7OPj5PWGnXDXNSmDJ3dgJh3+uz/oxfx9dCZ6iDQOos6UAbdsBkJeFyhBFmUBVE =
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=2007; t=1214593888; bh=qkML6f2GoSUtGkHr+hHGThhFQnQ3XjkddcCK14hwTw E=; l=1135; h=Subject:From:To:Cc:In-Reply-To:References: Content-Type:Date:Message-Id:Mime-Version: Content-Transfer-Encoding; b=NFpNYiJBObWlpLptyDmn7pC37IJjFiC09Vwxu 3ZIdNhxurhFyojmi2Yh0kBiy00dGBhINYJ2dCbTuYtfPTndVP5Q4g6sFlgRMasV/5gN dziMu//z3c8N5KTHFKQOk8t8oB58PiiquK+vIS53S1V5WyS8Hc53HIKPRLXTfJ5jTjU =
- References: <1214506750.3374.2.camel@localhost.localdomain> <y0miqvwastl.fsf@ton.toronto.redhat.com> <1214576542.3394.5.camel@localhost.localdomain> <20080627181342.GD22524@redhat.com>
On Fri, 2008-06-27 at 14:13 -0400, Frank Ch. Eigler wrote:
> Hi -
>
> By the way, for the $qc->scsi.... expression problem in the first
> case, did you consider/try using embedded-C code to do the pointer
> dereferencing?
Yes, but it's a completely awful solution ... it's also what led to the
crashes on FC9.
If a structure is resolvable it should be usable via the systemtap
language. Users complain enough about the interface anyway, telling
them they have to use ad hoc C fragment constructions in certain cases
they won't even be able to distinguish until they run into them is a
recipe for usability problems.
> as in:
>
> %{
> #include "linux/scsi-whatever."
> %}
> function filter_p:long (ptr:long) %{
> struct scsi_device* q = (struct scsi_device*) THIS->ptr;
Actually, it has to be
struct scsi_device* q = (struct scsi_device*)(unsigned long) THIS->ptr;
because of systemtap and C on x86 differning on the sizeof long.
> THIS->__retvalue = (q->scsicmd->.... & ... );
> %}
>
> probe module("libata").function("ata_qc_issue") {
> if (filter_p ($qc)) next;
> }
James