Linux CXL
 help / color / mirror / Atom feed
From: Ira Weiny <ira.weiny@intel.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: Alison Schofield <alison.schofield@intel.com>,
	<linux-cxl@vger.kernel.org>, <vishal.l.verma@intel.com>,
	<bwidawsk@kernel.org>, <dan.j.williams@intel.com>
Subject: Re: [PATCH 1/7] ndctl: cxl: add helper function to parse trace event to json object
Date: Wed, 2 Nov 2022 14:01:41 -0700	[thread overview]
Message-ID: <Y2LatYdIX7Nw75hf@iweiny-desk3> (raw)
In-Reply-To: <653ef2ee-0de3-1536-bf88-c7ea9cc67a4d@intel.com>

On Mon, Oct 31, 2022 at 02:37:02PM -0700, Jiang, Dave wrote:
> 
> 
> On 10/31/2022 1:01 PM, Alison Schofield wrote:

[snip]

> > > +			/* check to see if we have a UUID */
> > > +			tmp = strcasestr(f->name, "uuid");
> > > +			if (tmp && f->arraylen == 16) {
> > > +				char uuid[SYSFS_ATTR_SIZE];
> > > +
> > > +				uuid_unparse(data, uuid);
> > > +				jobj = json_object_new_string(uuid);
> > > +				if (!jobj) {
> > > +					rc = -ENOMEM;
> > > +					goto err;
> > > +				}
> > > +
> > > +				json_object_object_add(jevent, f->name, jobj);
> > > +				continue;
> > > +			}
> > 
> > Insted of comparing the field name, is it possible to check for
> > f->type of 'uuid_t'?
> > 
> 
> Yes. I talked to Ira and he'll change his uuid to uuid_t from u8[]. That
> should make it better. Thanks for pointing that out.

So after unborking my qemu I was able to actually try this.  And it did not
work the way I thought it would.

However, in the end Dave and I figured out how to make it work using the
__field_struct() TP entry type in the kernel and some mods to cxl.

Thanks Alison this is much better.

Ira

  reply	other threads:[~2022-11-02 21:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14 20:47 [PATCH 0/7] ndctl: cxl: add monitor support for trace events Dave Jiang
2022-09-14 20:47 ` [PATCH 1/7] ndctl: cxl: add helper function to parse trace event to json object Dave Jiang
2022-10-31 20:01   ` Alison Schofield
2022-10-31 21:37     ` Dave Jiang
2022-11-02 21:01       ` Ira Weiny [this message]
2022-09-14 20:48 ` [PATCH 2/7] ndctl: cxl: add helper to parse through all current events Dave Jiang
2022-10-31 20:05   ` Alison Schofield
2022-09-14 20:48 ` [PATCH 3/7] ndctl: cxl: add common function to enable event trace Dave Jiang
2022-09-14 20:48 ` [PATCH 4/7] ndctl: cxl: add common function to disable " Dave Jiang
2022-09-14 20:48 ` [PATCH 5/7] ndctl: cxl: add monitor function for event trace events Dave Jiang
2022-09-19 18:26   ` Alison Schofield
2022-09-14 20:48 ` [PATCH 6/7] ndctl: cxl: add logging functions for monitor Dave Jiang
2022-09-15 15:55   ` Nathan Fontenot
2022-09-15 16:02     ` Dave Jiang
2022-09-14 20:48 ` [PATCH 7/7] ndctl: cxl: add monitor command to cxl Dave Jiang
2022-09-14 22:19 ` [PATCH 0/7] ndctl: cxl: add monitor support for trace events Dave Jiang
2022-09-14 23:04   ` Verma, Vishal L
2022-09-22 14:21 ` Jonathan Cameron
2022-09-22 14:45   ` Dave Jiang

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=Y2LatYdIX7Nw75hf@iweiny-desk3 \
    --to=ira.weiny@intel.com \
    --cc=alison.schofield@intel.com \
    --cc=bwidawsk@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=vishal.l.verma@intel.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