diff options
| author | Ingo Molnar <mingo@kernel.org> | 2012-09-13 11:11:19 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2012-09-13 11:11:19 -0400 |
| commit | be267be8b191d5fac9f65a29e047470f364315eb (patch) | |
| tree | 80cdb3f7c1d53fc6209fac2d57ff9a4052e2750e /tools/perf/util/include/linux/kernel.h | |
| parent | d5cb2aef4fda355fbafe8db4f425b73ea94d2019 (diff) | |
| parent | 9ec3f4e437ede2f3b5087d412abe16a0219b3b99 (diff) | |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
* Remove die()/exit() calls from several tools.
* Add missing perf_regs.h file to MANIFEST
* Clean up and improve 'perf sched' performance by elliminating lots of
needless calls to libtraceevent.
* More patches to make perf build on Android, from Irina Tirdea
* Resolve vdso callchains, from Jiri Olsa
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/include/linux/kernel.h')
| -rw-r--r-- | tools/perf/util/include/linux/kernel.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/perf/util/include/linux/kernel.h b/tools/perf/util/include/linux/kernel.h index 4af9a10cc2d2..d8c927c868ee 100644 --- a/tools/perf/util/include/linux/kernel.h +++ b/tools/perf/util/include/linux/kernel.h | |||
| @@ -8,8 +8,8 @@ | |||
| 8 | 8 | ||
| 9 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 9 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
| 10 | 10 | ||
| 11 | #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) | 11 | #define PERF_ALIGN(x, a) __PERF_ALIGN_MASK(x, (typeof(x))(a)-1) |
| 12 | #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) | 12 | #define __PERF_ALIGN_MASK(x, mask) (((x)+(mask))&~(mask)) |
| 13 | 13 | ||
| 14 | #ifndef offsetof | 14 | #ifndef offsetof |
| 15 | #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) | 15 | #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) |
| @@ -46,6 +46,15 @@ | |||
| 46 | _min1 < _min2 ? _min1 : _min2; }) | 46 | _min1 < _min2 ? _min1 : _min2; }) |
| 47 | #endif | 47 | #endif |
| 48 | 48 | ||
| 49 | #ifndef roundup | ||
| 50 | #define roundup(x, y) ( \ | ||
| 51 | { \ | ||
| 52 | const typeof(y) __y = y; \ | ||
| 53 | (((x) + (__y - 1)) / __y) * __y; \ | ||
| 54 | } \ | ||
| 55 | ) | ||
| 56 | #endif | ||
| 57 | |||
| 49 | #ifndef BUG_ON | 58 | #ifndef BUG_ON |
| 50 | #ifdef NDEBUG | 59 | #ifdef NDEBUG |
| 51 | #define BUG_ON(cond) do { if (cond) {} } while (0) | 60 | #define BUG_ON(cond) do { if (cond) {} } while (0) |
