linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Naohiro Aota <naohiro.aota@hgst.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Wang Nan <wangnan0@huawei.com>,
	Hemant Kumar <hemant@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] perf probe: Support signedness casting
Date: Wed, 10 Aug 2016 10:04:40 -0300	[thread overview]
Message-ID: <20160810130440.GD4249@kernel.org> (raw)
In-Reply-To: <20160810073828.40a97ad6ef8b9824c81ac058@kernel.org>

Em Wed, Aug 10, 2016 at 07:38:28AM +0900, Masami Hiramatsu escreveu:
> On Tue, 9 Aug 2016 11:05:28 -0300 Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > Em Tue, Aug 09, 2016 at 11:40:08AM +0900, Naohiro Aota escreveu:
> > > This patch add signedness casting support. By specifying "s" or "u" as a
> > > type, perf-probe will investigate variable size as usual and use
> > > the specified signedness.

> > Humm, I tried with :u and got hexadecimal numbers, as before :-\ Can't
> > we do decimal numbers when :u is used? Just like with :s. We could then
> > use nothing and get the current behaviour or use :x for hexadecimal
> > numbers.
> 
> Hmm, would you mean we'll change the format in ftrace or perf?
> u8/16/32/64 is already used for showing hexadecimal numbers, and
> how it is shown, is decided by lib/traceevent. I think we can add
> specifying format string as a option in addition to the type cast for
> ftrace. But for perf, I'm not sure how it is decided to show the data.
> Does it follow the ftrace's printf format?

Humm, what I asked was: why using :s makes it appears as signed decimal
while :u makes it appear as unsigned _hexa_decimal?

Someone reading the announce for this patch is lead to think that 's'
and 'u' are just for signedness. So having another letter ('x') to
specify how to format it seems like a valid expectation.

If ftrace would use it? I don't know, I think it should.

And perf currently uses libtraceevent to do most of the field pretty
printing (symbol resolving is done using perf's symbol.c and friends,
for instance).

- Arnaldo 
 
> > Anyway, applied, when using :s this is a nice improvement, thanks!

  reply	other threads:[~2016-08-10 19:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05  5:33 [PATCH] perf probe: support signedness casting Naohiro Aota
2016-08-05  9:10 ` Masami Hiramatsu
2016-08-05 11:41   ` Naohiro Aota
2016-08-05 11:53 ` [PATCH v2] perf probe: Support " Naohiro Aota
2016-08-06 10:35   ` Masami Hiramatsu
2016-08-09  2:40     ` [PATCH v3] " Naohiro Aota
2016-08-09 10:02       ` Masami Hiramatsu
2016-08-09 14:05       ` Arnaldo Carvalho de Melo
2016-08-09 22:38         ` Masami Hiramatsu
2016-08-10 13:04           ` Arnaldo Carvalho de Melo [this message]
2016-08-10 19:37             ` Masami Hiramatsu
2016-08-09 19:19       ` [tip:perf/urgent] " tip-bot for Naohiro Aota
2016-08-09 22:28         ` Masami Hiramatsu
2016-08-10 13:48           ` Arnaldo Carvalho de Melo

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=20160810130440.GD4249@kernel.org \
    --to=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=hemant@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=naohiro.aota@hgst.com \
    --cc=peterz@infradead.org \
    --cc=wangnan0@huawei.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;
as well as URLs for NNTP newsgroup(s).