From: Ingo Molnar <mingo@elte.hu>
To: Paul Mackerras <paulus@samba.org>
Cc: benh@kernel.crashing.org, Peter Zijlstra <a.p.zijlstra@chello.nl>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf_counter: tools: Define and use our own u64, s64 etc. definitions
Date: Fri, 19 Jun 2009 18:23:30 +0200 [thread overview]
Message-ID: <20090619162330.GA15197@elte.hu> (raw)
In-Reply-To: <19003.33494.495844.956580@cargo.ozlabs.ibm.com>
* Paul Mackerras <paulus@samba.org> wrote:
> On 64-bit powerpc, __u64 is defined to be unsigned long rather
> than unsigned long long. This causes compiler warnings every time
> we print a __u64 value with %Lx.
>
> Rather than changing __u64, we define our own u64 to be unsigned
> long long on all architectures, and similarly s64 as signed long
> long. For consistency we also define u32, s32, u16, s16, u8 and
> s8. These definitions are put in a new header, types.h, because
> these definitions are needed in util/string.h and util/symbol.h.
>
> The main change here is the mechanical change of
> __[us]{64,32,16,8} to remove the "__". The other changes are:
>
> * Create types.h
> * Include types.h in perf.h, util/string.h and util/symbol.h
> * Add types.h to the LIB_H definition in Makefile
> * Added (u64) casts in process_overflow_event() and print_sym_table()
> to kill two remaining warnings.
>
> Signed-off-by: Paul Mackerras <paulus@samba.org>
> ---
> tools/perf/Makefile | 1 +
> tools/perf/builtin-annotate.c | 66 ++++++++++++++++----------------
> tools/perf/builtin-record.c | 20 +++++-----
> tools/perf/builtin-report.c | 80 ++++++++++++++++++++--------------------
> tools/perf/builtin-stat.c | 62 +++++++++++++++---------------
> tools/perf/builtin-top.c | 24 ++++++------
> tools/perf/perf.h | 1 +
> tools/perf/types.h | 17 ++++++++
> tools/perf/util/parse-events.c | 10 ++--
> tools/perf/util/string.c | 2 +-
> tools/perf/util/string.h | 4 +-
> tools/perf/util/symbol.c | 20 +++++-----
> tools/perf/util/symbol.h | 15 ++++---
> 13 files changed, 171 insertions(+), 151 deletions(-)
> create mode 100644 tools/perf/types.h
Very nice, thanks a lot Paul for going through this!
Ingo
next prev parent reply other threads:[~2009-06-19 16:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-19 12:21 [PATCH] perf_counter: tools: Define and use our own u64, s64 etc. definitions Paul Mackerras
2009-06-19 16:23 ` Ingo Molnar [this message]
2009-06-19 16:27 ` [tip:perfcounters/core] perf_counter " tip-bot for Paul Mackerras
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=20090619162330.GA15197@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.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