diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-03 15:40:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-03 15:40:46 -0400 |
commit | 7447d56217e215e50317f308aee1ed293ac4f749 (patch) | |
tree | 903832ecb206ae83160992c6aec40c624821941f /tools/include/linux | |
parent | 892ad5acca0b2ddb514fae63fa4686bf726d2471 (diff) | |
parent | 23acd3e1a0a377cf3730ccb753aa1fdc50378396 (diff) |
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf updates from Ingo Molnar:
"Most of the changes are for tooling, the main changes in this cycle were:
- Improve Intel-PT hardware tracing support, both on the kernel and
on the tooling side: PTWRITE instruction support, power events for
C-state tracing, etc. (Adrian Hunter)
- Add support to measure SMI cost to the x86 architecture, with
tooling support in 'perf stat' (Kan Liang)
- Support function filtering in 'perf ftrace', plus related
improvements (Namhyung Kim)
- Allow adding and removing fields to the default 'perf script'
columns, using + or - as field prefixes to do so (Andi Kleen)
- Allow resolving the DSO name with 'perf script -F brstack{sym,off},dso'
(Mark Santaniello)
- Add perf tooling unwind support for PowerPC (Paolo Bonzini)
- ... and various other improvements as well"
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (84 commits)
perf auxtrace: Add CPU filter support
perf intel-pt: Do not use TSC packets for calculating CPU cycles to TSC
perf intel-pt: Update documentation to include new ptwrite and power events
perf intel-pt: Add example script for power events and PTWRITE
perf intel-pt: Synthesize new power and "ptwrite" events
perf intel-pt: Move code in intel_pt_synth_events() to simplify attr setting
perf intel-pt: Factor out intel_pt_set_event_name()
perf intel-pt: Tidy messages into called function intel_pt_synth_event()
perf intel-pt: Tidy Intel PT evsel lookup into separate function
perf intel-pt: Join needlessly wrapped lines
perf intel-pt: Remove unused instructions_sample_period
perf intel-pt: Factor out common code synthesizing event samples
perf script: Add synthesized Intel PT power and ptwrite events
perf/x86/intel: Constify the 'lbr_desc[]' array and make a function static
perf script: Add 'synth' field for synthesized event payloads
perf auxtrace: Add itrace option to output power events
perf auxtrace: Add itrace option to output ptwrite events
tools include: Add byte-swapping macros to kernel.h
perf script: Add 'synth' event type for synthesized events
x86/insn: perf tools: Add new ptwrite instruction
...
Diffstat (limited to 'tools/include/linux')
-rw-r--r-- | tools/include/linux/compiler-gcc.h | 10 | ||||
-rw-r--r-- | tools/include/linux/compiler.h | 4 | ||||
-rw-r--r-- | tools/include/linux/kernel.h | 35 |
3 files changed, 43 insertions, 6 deletions
diff --git a/tools/include/linux/compiler-gcc.h b/tools/include/linux/compiler-gcc.h index 825d44f89a29..bd39b2090ad1 100644 --- a/tools/include/linux/compiler-gcc.h +++ b/tools/include/linux/compiler-gcc.h | |||
@@ -19,3 +19,13 @@ | |||
19 | 19 | ||
20 | /* &a[0] degrades to a pointer: a different type from an array */ | 20 | /* &a[0] degrades to a pointer: a different type from an array */ |
21 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) | 21 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) |
22 | |||
23 | #define noinline __attribute__((noinline)) | ||
24 | |||
25 | #define __packed __attribute__((packed)) | ||
26 | |||
27 | #define __noreturn __attribute__((noreturn)) | ||
28 | |||
29 | #define __aligned(x) __attribute__((aligned(x))) | ||
30 | #define __printf(a, b) __attribute__((format(printf, a, b))) | ||
31 | #define __scanf(a, b) __attribute__((format(scanf, a, b))) | ||
diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h index ef6ab908a42f..d7a5604c38d7 100644 --- a/tools/include/linux/compiler.h +++ b/tools/include/linux/compiler.h | |||
@@ -17,6 +17,10 @@ | |||
17 | # define __always_inline inline __attribute__((always_inline)) | 17 | # define __always_inline inline __attribute__((always_inline)) |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #ifndef noinline | ||
21 | #define noinline | ||
22 | #endif | ||
23 | |||
20 | /* Are two types/vars the same type (ignoring qualifiers)? */ | 24 | /* Are two types/vars the same type (ignoring qualifiers)? */ |
21 | #ifndef __same_type | 25 | #ifndef __same_type |
22 | # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | 26 | # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) |
diff --git a/tools/include/linux/kernel.h b/tools/include/linux/kernel.h index 801b927499f2..77d2e94ca5df 100644 --- a/tools/include/linux/kernel.h +++ b/tools/include/linux/kernel.h | |||
@@ -5,6 +5,8 @@ | |||
5 | #include <stddef.h> | 5 | #include <stddef.h> |
6 | #include <assert.h> | 6 | #include <assert.h> |
7 | #include <linux/compiler.h> | 7 | #include <linux/compiler.h> |
8 | #include <endian.h> | ||
9 | #include <byteswap.h> | ||
8 | 10 | ||
9 | #ifndef UINT_MAX | 11 | #ifndef UINT_MAX |
10 | #define UINT_MAX (~0U) | 12 | #define UINT_MAX (~0U) |
@@ -68,12 +70,33 @@ | |||
68 | #endif | 70 | #endif |
69 | #endif | 71 | #endif |
70 | 72 | ||
71 | /* | 73 | #if __BYTE_ORDER == __BIG_ENDIAN |
72 | * Both need more care to handle endianness | 74 | #define cpu_to_le16 bswap_16 |
73 | * (Don't use bitmap_copy_le() for now) | 75 | #define cpu_to_le32 bswap_32 |
74 | */ | 76 | #define cpu_to_le64 bswap_64 |
75 | #define cpu_to_le64(x) (x) | 77 | #define le16_to_cpu bswap_16 |
76 | #define cpu_to_le32(x) (x) | 78 | #define le32_to_cpu bswap_32 |
79 | #define le64_to_cpu bswap_64 | ||
80 | #define cpu_to_be16 | ||
81 | #define cpu_to_be32 | ||
82 | #define cpu_to_be64 | ||
83 | #define be16_to_cpu | ||
84 | #define be32_to_cpu | ||
85 | #define be64_to_cpu | ||
86 | #else | ||
87 | #define cpu_to_le16 | ||
88 | #define cpu_to_le32 | ||
89 | #define cpu_to_le64 | ||
90 | #define le16_to_cpu | ||
91 | #define le32_to_cpu | ||
92 | #define le64_to_cpu | ||
93 | #define cpu_to_be16 bswap_16 | ||
94 | #define cpu_to_be32 bswap_32 | ||
95 | #define cpu_to_be64 bswap_64 | ||
96 | #define be16_to_cpu bswap_16 | ||
97 | #define be32_to_cpu bswap_32 | ||
98 | #define be64_to_cpu bswap_64 | ||
99 | #endif | ||
77 | 100 | ||
78 | int vscnprintf(char *buf, size_t size, const char *fmt, va_list args); | 101 | int vscnprintf(char *buf, size_t size, const char *fmt, va_list args); |
79 | int scnprintf(char * buf, size_t size, const char * fmt, ...); | 102 | int scnprintf(char * buf, size_t size, const char * fmt, ...); |