LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Javi Merino <javi.merino@arm.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Dave P Martin <Dave.Martin@arm.com>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH v4 1/3] tracing: Add array printing helpers
Date: Wed, 28 Jan 2015 07:38:04 -0500	[thread overview]
Message-ID: <20150128073804.12bc56a5@gandalf.local.home> (raw)
In-Reply-To: <20150128122403.GA1542@e104805>

On Wed, 28 Jan 2015 12:24:03 +0000
Javi Merino <javi.merino@arm.com> wrote:

> > > el_size should not be based on bits, it should be based on bytes. I
> > > passed in "sizeof()" which doesn't work with bits.
> 
> Ugh.  If you use sizeof() in print_array() then trace-cmd won't be
> able to parse it since it doesn't have an implementation of sizeof().
> 
>   [thermal_power_allocator:thermal_power_allocator] function sizeof not defined
>   Error: expected type 5 but read 0
> *** Error in `./trace-cmd': double free or corruption (fasttop): 0x0000000000e04980 ***
> 
> Implementing a fully functional sizeof() in trace-cmd will be a huge
> beast, I guess you will have to limit it to only some types.

Well it shouldn't crash, because people will be using things like
sizeof(). Just default it to 4 or 8 (word length).

We can work on a sizeof routine later. I have ideas on how to do it. Or
at least make it work for the common cases.

-- Steve

> 
> > > Please update to "el_size < 1 || el_size > 8".
> > > 
> > > and adjust the rest accordingly.
> > 
> > Done, I'm testing it now.  I'll send a v5 later today.
> > 
> > Cheers,
> > Javi


  reply	other threads:[~2015-01-28 21:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 12:11 [PATCH v4 0/3] Add array printing helpers to ftrace Javi Merino
2015-01-26 12:11 ` [PATCH v4 1/3] tracing: Add array printing helpers Javi Merino
2015-01-28  3:35   ` Steven Rostedt
2015-01-28 11:26     ` Javi Merino
2015-01-28 12:24       ` Javi Merino
2015-01-28 12:38         ` Steven Rostedt [this message]
2015-01-26 12:11 ` [PATCH v4 2/3] tools lib traceevent: factor out allocating and processing args Javi Merino
2015-01-26 12:11 ` [PATCH v4 3/3] tools lib traceevent: Add support for __print_array() Javi Merino

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=20150128073804.12bc56a5@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=Dave.Martin@arm.com \
    --cc=javi.merino@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --subject='Re: [PATCH v4 1/3] tracing: Add array printing helpers' \
    /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

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 NNTP newsgroup(s).