diff options
| author | Ingo Molnar <mingo@kernel.org> | 2015-09-29 03:43:46 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2015-09-29 03:43:46 -0400 |
| commit | 9c17dbc6eb73bdd8a6aaea1baefd37ff78d86148 (patch) | |
| tree | 5b303f98bc8898f26d2445138904f2fb14403a2d /tools/lib | |
| parent | 18ab2cd3ee9d52dc64c5ae984146a261a328c4e8 (diff) | |
| parent | e637d17757a10732fa5d573c18f20b3cd4d31245 (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:
- Accept a zero --itrace period, meaning "as often as possible". In the case
of Intel PT that is the same as a period of 1 and a unit of 'instructions'
(i.e. --itrace=i1i). (Adrian Hunter)
- Harmonize itrace's synthesized callchains with the existing --max-stack
tool option. (Adrian Hunter)
- Allow time to be displayed in nanoseconds in 'perf script'. (Adrian Hunter)
- Fix potential infinite loop when handling Intel PT timestamps. (Adrian Hunter)
- Slighly improve Intel PT debug logging. (Adrian Hunter)
- Warn when AUX data has been lost, just like when processing PERF_RECORD_LOST.
(Adrian Hunter)
- Further document export-to-postgresql.py script. (Adrian Hunter)
- Add option to synthesize branch stack from auxtrace data. (Adrian Hunter)
- Use equivalent logic to avoid using dso->kernel. (Arnaldo Carvalho de Melo)
- Show proper error messages when parsing bad terms for hw/sw events. (He Kuang)
- Tracepoint event parsing improvements. (He Kuang)
- Store tracing mountpoint for better error message. (Jiri Olsa)
- Add fixdep to tools/build, bringing it closer to the kernel counterpart, from
where it is being lifted. (Jiri Olsa)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/lib')
| -rw-r--r-- | tools/lib/api/Makefile | 6 | ||||
| -rw-r--r-- | tools/lib/api/fs/tracing_path.c | 13 | ||||
| -rw-r--r-- | tools/lib/bpf/Makefile | 6 | ||||
| -rw-r--r-- | tools/lib/lockdep/Makefile | 6 |
4 files changed, 15 insertions, 16 deletions
diff --git a/tools/lib/api/Makefile b/tools/lib/api/Makefile index fe1b02c2c95b..d85904dc9b38 100644 --- a/tools/lib/api/Makefile +++ b/tools/lib/api/Makefile | |||
| @@ -21,12 +21,14 @@ CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 | |||
| 21 | 21 | ||
| 22 | RM = rm -f | 22 | RM = rm -f |
| 23 | 23 | ||
| 24 | build := -f $(srctree)/tools/build/Makefile.build dir=. obj | ||
| 25 | API_IN := $(OUTPUT)libapi-in.o | 24 | API_IN := $(OUTPUT)libapi-in.o |
| 26 | 25 | ||
| 26 | all: | ||
| 27 | |||
| 27 | export srctree OUTPUT CC LD CFLAGS V | 28 | export srctree OUTPUT CC LD CFLAGS V |
| 29 | include $(srctree)/tools/build/Makefile.include | ||
| 28 | 30 | ||
| 29 | all: $(LIBFILE) | 31 | all: fixdep $(LIBFILE) |
| 30 | 32 | ||
| 31 | $(API_IN): FORCE | 33 | $(API_IN): FORCE |
| 32 | @$(MAKE) $(build)=libapi | 34 | @$(MAKE) $(build)=libapi |
diff --git a/tools/lib/api/fs/tracing_path.c b/tools/lib/api/fs/tracing_path.c index 38aca2dd1946..0406a7d5c891 100644 --- a/tools/lib/api/fs/tracing_path.c +++ b/tools/lib/api/fs/tracing_path.c | |||
| @@ -12,12 +12,14 @@ | |||
| 12 | #include "tracing_path.h" | 12 | #include "tracing_path.h" |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | char tracing_mnt[PATH_MAX + 1] = "/sys/kernel/debug"; | ||
| 15 | char tracing_path[PATH_MAX + 1] = "/sys/kernel/debug/tracing"; | 16 | char tracing_path[PATH_MAX + 1] = "/sys/kernel/debug/tracing"; |
| 16 | char tracing_events_path[PATH_MAX + 1] = "/sys/kernel/debug/tracing/events"; | 17 | char tracing_events_path[PATH_MAX + 1] = "/sys/kernel/debug/tracing/events"; |
| 17 | 18 | ||
| 18 | 19 | ||
| 19 | static void __tracing_path_set(const char *tracing, const char *mountpoint) | 20 | static void __tracing_path_set(const char *tracing, const char *mountpoint) |
| 20 | { | 21 | { |
| 22 | snprintf(tracing_mnt, sizeof(tracing_mnt), "%s", mountpoint); | ||
| 21 | snprintf(tracing_path, sizeof(tracing_path), "%s/%s", | 23 | snprintf(tracing_path, sizeof(tracing_path), "%s/%s", |
| 22 | mountpoint, tracing); | 24 | mountpoint, tracing); |
| 23 | snprintf(tracing_events_path, sizeof(tracing_events_path), "%s/%s%s", | 25 | snprintf(tracing_events_path, sizeof(tracing_events_path), "%s/%s%s", |
| @@ -109,19 +111,10 @@ static int strerror_open(int err, char *buf, size_t size, const char *filename) | |||
| 109 | "Hint:\tTry 'sudo mount -t debugfs nodev /sys/kernel/debug'"); | 111 | "Hint:\tTry 'sudo mount -t debugfs nodev /sys/kernel/debug'"); |
| 110 | break; | 112 | break; |
| 111 | case EACCES: { | 113 | case EACCES: { |
| 112 | const char *mountpoint = debugfs__mountpoint(); | ||
| 113 | |||
| 114 | if (!access(mountpoint, R_OK) && strncmp(filename, "tracing/", 8) == 0) { | ||
| 115 | const char *tracefs_mntpoint = tracefs__mountpoint(); | ||
| 116 | |||
| 117 | if (tracefs_mntpoint) | ||
| 118 | mountpoint = tracefs__mountpoint(); | ||
| 119 | } | ||
| 120 | |||
| 121 | snprintf(buf, size, | 114 | snprintf(buf, size, |
| 122 | "Error:\tNo permissions to read %s/%s\n" | 115 | "Error:\tNo permissions to read %s/%s\n" |
| 123 | "Hint:\tTry 'sudo mount -o remount,mode=755 %s'\n", | 116 | "Hint:\tTry 'sudo mount -o remount,mode=755 %s'\n", |
| 124 | tracing_events_path, filename, mountpoint); | 117 | tracing_events_path, filename, tracing_mnt); |
| 125 | } | 118 | } |
| 126 | break; | 119 | break; |
| 127 | default: | 120 | default: |
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index e630f9fc4fb6..fc9af57b666e 100644 --- a/tools/lib/bpf/Makefile +++ b/tools/lib/bpf/Makefile | |||
| @@ -123,8 +123,10 @@ endif | |||
| 123 | # the same command line setup. | 123 | # the same command line setup. |
| 124 | MAKEOVERRIDES= | 124 | MAKEOVERRIDES= |
| 125 | 125 | ||
| 126 | all: | ||
| 127 | |||
| 126 | export srctree OUTPUT CC LD CFLAGS V | 128 | export srctree OUTPUT CC LD CFLAGS V |
| 127 | build := -f $(srctree)/tools/build/Makefile.build dir=. obj | 129 | include $(srctree)/tools/build/Makefile.include |
| 128 | 130 | ||
| 129 | BPF_IN := $(OUTPUT)libbpf-in.o | 131 | BPF_IN := $(OUTPUT)libbpf-in.o |
| 130 | LIB_FILE := $(addprefix $(OUTPUT),$(LIB_FILE)) | 132 | LIB_FILE := $(addprefix $(OUTPUT),$(LIB_FILE)) |
| @@ -133,7 +135,7 @@ CMD_TARGETS = $(LIB_FILE) | |||
| 133 | 135 | ||
| 134 | TARGETS = $(CMD_TARGETS) | 136 | TARGETS = $(CMD_TARGETS) |
| 135 | 137 | ||
| 136 | all: $(VERSION_FILES) all_cmd | 138 | all: fixdep $(VERSION_FILES) all_cmd |
| 137 | 139 | ||
| 138 | all_cmd: $(CMD_TARGETS) | 140 | all_cmd: $(CMD_TARGETS) |
| 139 | 141 | ||
diff --git a/tools/lib/lockdep/Makefile b/tools/lib/lockdep/Makefile index 18ffccf00426..7e319afac78a 100644 --- a/tools/lib/lockdep/Makefile +++ b/tools/lib/lockdep/Makefile | |||
| @@ -93,8 +93,10 @@ else | |||
| 93 | print_install = echo ' INSTALL '$1' to $(DESTDIR_SQ)$2'; | 93 | print_install = echo ' INSTALL '$1' to $(DESTDIR_SQ)$2'; |
| 94 | endif | 94 | endif |
| 95 | 95 | ||
| 96 | all: | ||
| 97 | |||
| 96 | export srctree OUTPUT CC LD CFLAGS V | 98 | export srctree OUTPUT CC LD CFLAGS V |
| 97 | build := -f $(srctree)/tools/build/Makefile.build dir=. obj | 99 | include $(srctree)/tools/build/Makefile.include |
| 98 | 100 | ||
| 99 | do_compile_shared_library = \ | 101 | do_compile_shared_library = \ |
| 100 | ($(print_shared_lib_compile) \ | 102 | ($(print_shared_lib_compile) \ |
| @@ -109,7 +111,7 @@ CMD_TARGETS = $(LIB_FILE) | |||
| 109 | TARGETS = $(CMD_TARGETS) | 111 | TARGETS = $(CMD_TARGETS) |
| 110 | 112 | ||
| 111 | 113 | ||
| 112 | all: all_cmd | 114 | all: fixdep all_cmd |
| 113 | 115 | ||
| 114 | all_cmd: $(CMD_TARGETS) | 116 | all_cmd: $(CMD_TARGETS) |
| 115 | 117 | ||
