From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Yunlong Song <yunlong.song@huawei.com>
Cc: a.p.zijlstra@chello.nl, paulus@samba.org, mingo@redhat.com,
linux-kernel@vger.kernel.org, wangnan0@huawei.com
Subject: Re: [PATCH] perf record: Conditionally define CLOCK_MONOTONIC_RAW for older OSes
Date: Wed, 8 Apr 2015 10:03:08 -0300 [thread overview]
Message-ID: <20150408130308.GA5403@kernel.org> (raw)
In-Reply-To: <1428465748-14476-1-git-send-email-yunlong.song@huawei.com>
Em Wed, Apr 08, 2015 at 12:02:28PM +0800, Yunlong Song escreveu:
> Commit 31a9883106cc ("perf record: Add clockid parameter") used
> CLOCK_MONOTONIC_RAW in the struct clockid_map clockids[], but the
> CLOCK_MONOTONIC_RAW macro is not defined in older releases (e.g., SLES
> 11 SP2), thus there is a building error when making perf:
>
> builtin-record.c:738: error: ‘CLOCK_MONOTONIC_RAW’ undeclared here (not in a function)
> make[2]: *** [builtin-record.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> LD bench/perf-in.o
> LD tests/perf-in.o
> make[1]: *** [perf-in.o] Error 2
> make: *** [all] Error 2
>
> So define this macro if it is not defined.
Since I am fixing that pull request batch, I am folding this patch into
Peter's original, adding credit to you, ok?
- Arnaldo
> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
> ---
> tools/perf/builtin-record.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index cfdff50..5b0962a 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -731,6 +731,9 @@ struct clockid_map {
> #ifndef CLOCK_TAI
> #define CLOCK_TAI 11
> #endif
> +#ifndef CLOCK_MONOTONIC_RAW
> +#define CLOCK_MONOTONIC_RAW 4
> +#endif
>
> static const struct clockid_map clockids[] = {
> /* available for all events, NMI safe */
> --
> 1.8.5.5
next prev parent reply other threads:[~2015-04-08 13:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 4:02 [PATCH] perf record: Conditionally define CLOCK_MONOTONIC_RAW for older OSes Yunlong Song
2015-04-08 8:55 ` Peter Zijlstra
2015-04-08 12:46 ` Yunlong Song
2015-04-08 13:03 ` Arnaldo Carvalho de Melo [this message]
2015-04-08 13:10 ` Yunlong Song
2015-04-08 13:33 ` 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=20150408130308.GA5403@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=wangnan0@huawei.com \
--cc=yunlong.song@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