From: tip-bot for Namhyung Kim <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, hpa@zytor.com,
mingo@kernel.org, namhyung.kim@lge.com, namhyung@kernel.org,
jolsa@redhat.com, fweisbec@gmail.com, rostedt@goodmis.org,
tglx@linutronix.de
Subject: [tip:perf/core] tools include: Define likely/unlikely in linux/ compiler.h
Date: Tue, 14 Jan 2014 08:40:35 -0800 [thread overview]
Message-ID: <tip-835d44b9041e578e3e553a57dfffc7003605c93b@git.kernel.org> (raw)
In-Reply-To: <1389276059-8829-3-git-send-email-namhyung@kernel.org>
Commit-ID: 835d44b9041e578e3e553a57dfffc7003605c93b
Gitweb: http://git.kernel.org/tip/835d44b9041e578e3e553a57dfffc7003605c93b
Author: Namhyung Kim <namhyung@kernel.org>
AuthorDate: Thu, 9 Jan 2014 23:00:53 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 13 Jan 2014 10:06:26 -0300
tools include: Define likely/unlikely in linux/compiler.h
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1389276059-8829-3-git-send-email-namhyung@kernel.org
[ Added the new header to tools/perf/MANIFEST ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/include/linux/compiler.h | 8 ++++++++
tools/perf/MANIFEST | 1 +
2 files changed, 9 insertions(+)
diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h
index 0135ccf..fbc6665 100644
--- a/tools/include/linux/compiler.h
+++ b/tools/include/linux/compiler.h
@@ -27,4 +27,12 @@
# define __weak __attribute__((weak))
#endif
+#ifndef likely
+# define likely(x) __builtin_expect(!!(x), 1)
+#endif
+
+#ifndef unlikely
+# define unlikely(x) __builtin_expect(!!(x), 0)
+#endif
+
#endif /* _TOOLS_LINUX_COMPILER_H */
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST
index 3170a7f..285f28f 100644
--- a/tools/perf/MANIFEST
+++ b/tools/perf/MANIFEST
@@ -4,6 +4,7 @@ tools/lib/traceevent
tools/lib/lk
tools/lib/symbol/kallsyms.c
tools/lib/symbol/kallsyms.h
+tools/include/linux/compiler.h
include/linux/const.h
include/linux/perf_event.h
include/linux/rbtree.h
next prev parent reply other threads:[~2014-01-14 16:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 14:00 [PATCHSET 0/8] tools lib traceevent: Get rid of *die finally!! (v3) Namhyung Kim
2014-01-09 14:00 ` [PATCH 1/8] tools include: Move perf's linux/compiler.h to a generic place Namhyung Kim
2014-01-14 16:40 ` [tip:perf/core] tools include: Move perf's linux/ compiler.h " tip-bot for Namhyung Kim
2014-01-09 14:00 ` [PATCH 2/8] tools include: Define likely/unlikely in linux/compiler.h Namhyung Kim
2014-01-14 16:40 ` tip-bot for Namhyung Kim [this message]
2014-01-09 14:00 ` [PATCH 3/8] tools include: Move perf's bug.h to a generic place Namhyung Kim
2014-01-14 16:40 ` [tip:perf/core] tools include: Move perf' s " tip-bot for Namhyung Kim
2014-01-09 14:00 ` [PATCH 4/8] tools include: Include <linux/compiler.h> from asm/bug.h Namhyung Kim
2014-01-14 16:41 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-01-09 14:00 ` [PATCH 5/8] tools lib traceevent: Add state member to struct trace_seq Namhyung Kim
2014-01-09 14:00 ` [PATCH 6/8] tools lib traceevent: Check return value of realloc() Namhyung Kim
2014-01-09 14:00 ` [PATCH 7/8] tools lib traceevent: Get rid of malloc_or_die() in trace_seq_init() Namhyung Kim
2014-01-09 14:00 ` [PATCH 8/8] tools lib traceevent: Get rid of die() finally!! Namhyung Kim
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=tip-835d44b9041e578e3e553a57dfffc7003605c93b@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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