From: David Laight <David.Laight@ACULAB.COM>
To: 'Steven Rostedt' <rostedt@goodmis.org>
Cc: 'Tom Zanussi' <zanussi@kernel.org>,
Sven Schnelle <svens@stackframe.org>,
"linux-trace-devel@vger.kernel.org"
<linux-trace-devel@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: RE: ftrace histogram sorting broken on BE architecures
Date: Tue, 17 Dec 2019 10:05:57 +0000 [thread overview]
Message-ID: <b4f7cbd8653e4e8eba5405b533c13469@AcuMS.aculab.com> (raw)
In-Reply-To: <20191216132922.1bf6d5cd@gandalf.local.home>
From: Steven Rostedt
> Sent: 16 December 2019 18:29
> On Mon, 16 Dec 2019 17:06:50 +0000
> David Laight <David.Laight@ACULAB.COM> wrote:
>
> > > Where original_val_a could be a byte, short, int, long or long long.
> >
> > I'd sort of guessed that, but then the pointer type passed to tracing_map_cmp_##type()
> > will always be 'u64 *' (since the field the address is taken of must be that type).
> > Then the (u64 *) casts are no longer needed.
> >
> > Possibly you can just pass the u64 values to:
> > tracing_map_cmp_##type(type a, type b)
> > {
> > return a > b ? 1 : a < b ? -1 : 0;
> > }
> >
> > The high bit masking and sign extension is then implicit in the call.
>
> But these are used to pass into a compare function that takes compare
> functions that are something other than numbers. They can be pointers
> to strings.
In that case I think I'd embed the u64 inside a structure and pass the structure
address to the compare function.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2019-12-17 10:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 12:33 ftrace histogram sorting broken on BE architecures Sven Schnelle
2019-12-11 15:35 ` Steven Rostedt
2019-12-11 16:09 ` Steven Rostedt
2019-12-11 16:37 ` Tom Zanussi
2019-12-11 17:00 ` Steven Rostedt
2019-12-11 19:26 ` Tom Zanussi
2019-12-12 18:07 ` Steven Rostedt
2019-12-12 19:15 ` Tom Zanussi
2019-12-11 18:14 ` Sven Schnelle
2019-12-12 19:17 ` Tom Zanussi
2019-12-16 15:47 ` David Laight
2019-12-16 16:05 ` Steven Rostedt
2019-12-16 17:06 ` David Laight
2019-12-16 18:29 ` Steven Rostedt
2019-12-17 10:05 ` David Laight [this message]
2019-12-18 15:33 ` Steven Rostedt
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=b4f7cbd8653e4e8eba5405b533c13469@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=svens@stackframe.org \
--cc=zanussi@kernel.org \
/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).