Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1459599

Re: [PATCH v3] perf probe: Support signedness casting

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3] perf probe: Support signedness casting
Date 2016-08-10 21:10 +0200
Message-ID <s4H35-I0-73@gated-at.bofh.it> (permalink)
References <s3g4V-1Yq-5@gated-at.bofh.it> <s4c8V-6b7-17@gated-at.bofh.it> <s4fTb-bN-21@gated-at.bofh.it> <s4nQJ-585-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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!

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2] perf probe: Support signedness casting Masami Hiramatsu <mhiramat@kernel.org> - 2016-08-06 22:10 +0200
  Re: [PATCH v3] perf probe: Support signedness casting Masami Hiramatsu <mhiramat@kernel.org> - 2016-08-09 12:10 +0200
  Re: [PATCH v3] perf probe: Support signedness casting Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-09 16:10 +0200
    Re: [PATCH v3] perf probe: Support signedness casting Masami Hiramatsu <mhiramat@kernel.org> - 2016-08-10 00:40 +0200
      Re: [PATCH v3] perf probe: Support signedness casting Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-10 21:10 +0200
        Re: [PATCH v3] perf probe: Support signedness casting Masami Hiramatsu <mhiramat@kernel.org> - 2016-08-10 21:40 +0200

csiph-web