public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
From: Alan Maguire <alan.maguire@oracle.com>
To: Kris Van Hees <kris.van.hees@oracle.com>
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [DTrace-devel] [PATCH v4 1/7] cg: move get_member() to dt_cg.c
Date: Wed, 9 Jul 2025 20:47:48 +0100	[thread overview]
Message-ID: <049a656e-2966-4026-9628-fbfe4ef2aea8@oracle.com> (raw)
In-Reply-To: <aG6dPiH9HFhmFrc1@oracle.com>

On 09/07/2025 17:47, Kris Van Hees wrote:
> Woops, one more.
> 
> On Wed, Jul 09, 2025 at 12:28:15PM -0400, Kris Van Hees wrote:
>> Some comments below...  Sorry - I got distracted by the other patches and
>> failed to give this one attention.
>>
>> On Wed, Jul 09, 2025 at 03:46:54PM +0100, Alan Maguire via DTrace-devel wrote:
>>> It will be used by both dt_prov_ip.c and dt_prov_tcp.c.
>>>
>>> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
>>> Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
>>> ---
>>>  libdtrace/dt_cg.c      | 39 ++++++++++++++++++++++++++++++++++++
>>>  libdtrace/dt_cg.h      |  2 ++
>>>  libdtrace/dt_prov_ip.c | 45 ++++--------------------------------------
>>>  3 files changed, 45 insertions(+), 41 deletions(-)
>>>
>>> diff --git a/libdtrace/dt_cg.c b/libdtrace/dt_cg.c
>>> index bd0763d6..d6fc8259 100644
>>> --- a/libdtrace/dt_cg.c
>>> +++ b/libdtrace/dt_cg.c
>>> @@ -1901,6 +1901,45 @@ dt_cg_ctf_offsetof(const char *structname, const char *membername,
>>>  	return (ctm.ctm_offset / NBBY);
>>>  }
>>>  
>>> +/*
>>> + * Retrieve the value of a member in a given struct.
>>> + *
>>> + * Entry:
>>> + *	reg = TYPE *ptr
>>> + *
>>> + * Return:
>>> + *	%r0 = ptr->member
>>> + * Clobbers:
>>> + *	%r1 .. %r5
>>> + */
>>> +int
>>> +dt_cg_get_member(dt_pcb_t *pcb, const char *name, int reg,
>>> +		 const char *member)
> 
> Why is dt_cg_get_member() returning int?  Nothing looks at it anyway.  ANd
> with the change to use dt_cg_ctf_offset(), compilation error will be repotred
> from there.
>

all sounds good; I've removed the return value and refactored as you
suggest, all working now. I'll hold off on sending an updated v5 patch
series since this one's only just out the door. Thanks!

Alan

  reply	other threads:[~2025-07-09 19:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-09 14:46 [PATCH v4 0/7] DTrace TCP provider Alan Maguire
2025-07-09 14:46 ` [PATCH v4 1/7] cg: move get_member() to dt_cg.c Alan Maguire
2025-07-09 16:28   ` [DTrace-devel] " Kris Van Hees
2025-07-09 16:47     ` Kris Van Hees
2025-07-09 19:47       ` Alan Maguire [this message]
2025-07-09 14:46 ` [PATCH v4 2/7] cg: bump number of TSLOTS to 6 Alan Maguire
2025-07-10  4:46   ` [DTrace-devel] " Kris Van Hees
2025-07-09 14:46 ` [PATCH v4 3/7] test/operators: extend ternary tests to cover inet_ntoa*()s Alan Maguire
2025-07-21 19:59   ` [DTrace-devel] " Kris Van Hees
2025-07-09 14:46 ` [PATCH v4 4/7] providers: move network-generic definitions to net.d Alan Maguire
2025-07-21 20:24   ` [DTrace-devel] " Kris Van Hees
2025-07-09 14:46 ` [PATCH v4 5/7] tcp: new provider Alan Maguire
2025-07-09 14:46 ` [PATCH v4 6/7] dlibs: sync ip.d, net.d and tcp.d Alan Maguire
2025-07-21 22:27   ` [DTrace-devel] " Kris Van Hees
2025-07-09 14:47 ` [PATCH v4 7/7] unittest/tcp: update test.x Alan Maguire
2025-07-21 22:36   ` [DTrace-devel] " Kris Van Hees

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=049a656e-2966-4026-9628-fbfe4ef2aea8@oracle.com \
    --to=alan.maguire@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    --cc=kris.van.hees@oracle.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