diff options
Diffstat (limited to 'tools')
36 files changed, 2434 insertions, 117 deletions
diff --git a/tools/Makefile b/tools/Makefile index 41067f304215..a9b02008443c 100644 --- a/tools/Makefile +++ b/tools/Makefile | |||
| @@ -15,6 +15,7 @@ help: | |||
| 15 | @echo ' net - misc networking tools' | 15 | @echo ' net - misc networking tools' |
| 16 | @echo ' vm - misc vm tools' | 16 | @echo ' vm - misc vm tools' |
| 17 | @echo ' x86_energy_perf_policy - Intel energy policy tool' | 17 | @echo ' x86_energy_perf_policy - Intel energy policy tool' |
| 18 | @echo ' tmon - thermal monitoring and tuning tool' | ||
| 18 | @echo '' | 19 | @echo '' |
| 19 | @echo 'You can do:' | 20 | @echo 'You can do:' |
| 20 | @echo ' $$ make -C tools/ <tool>_install' | 21 | @echo ' $$ make -C tools/ <tool>_install' |
| @@ -50,6 +51,9 @@ selftests: FORCE | |||
| 50 | turbostat x86_energy_perf_policy: FORCE | 51 | turbostat x86_energy_perf_policy: FORCE |
| 51 | $(call descend,power/x86/$@) | 52 | $(call descend,power/x86/$@) |
| 52 | 53 | ||
| 54 | tmon: FORCE | ||
| 55 | $(call descend,thermal/$@) | ||
| 56 | |||
| 53 | cpupower_install: | 57 | cpupower_install: |
| 54 | $(call descend,power/$(@:_install=),install) | 58 | $(call descend,power/$(@:_install=),install) |
| 55 | 59 | ||
| @@ -62,9 +66,13 @@ selftests_install: | |||
| 62 | turbostat_install x86_energy_perf_policy_install: | 66 | turbostat_install x86_energy_perf_policy_install: |
| 63 | $(call descend,power/x86/$(@:_install=),install) | 67 | $(call descend,power/x86/$(@:_install=),install) |
| 64 | 68 | ||
| 69 | tmon_install: | ||
| 70 | $(call descend,thermal/$(@:_install=),install) | ||
| 71 | |||
| 65 | install: cgroup_install cpupower_install firewire_install lguest_install \ | 72 | install: cgroup_install cpupower_install firewire_install lguest_install \ |
| 66 | perf_install selftests_install turbostat_install usb_install \ | 73 | perf_install selftests_install turbostat_install usb_install \ |
| 67 | virtio_install vm_install net_install x86_energy_perf_policy_install | 74 | virtio_install vm_install net_install x86_energy_perf_policy_install \ |
| 75 | tmon | ||
| 68 | 76 | ||
| 69 | cpupower_clean: | 77 | cpupower_clean: |
| 70 | $(call descend,power/cpupower,clean) | 78 | $(call descend,power/cpupower,clean) |
| @@ -84,8 +92,11 @@ selftests_clean: | |||
| 84 | turbostat_clean x86_energy_perf_policy_clean: | 92 | turbostat_clean x86_energy_perf_policy_clean: |
| 85 | $(call descend,power/x86/$(@:_clean=),clean) | 93 | $(call descend,power/x86/$(@:_clean=),clean) |
| 86 | 94 | ||
| 95 | tmon_clean: | ||
| 96 | $(call descend,thermal/tmon,clean) | ||
| 97 | |||
| 87 | clean: cgroup_clean cpupower_clean firewire_clean lguest_clean perf_clean \ | 98 | clean: cgroup_clean cpupower_clean firewire_clean lguest_clean perf_clean \ |
| 88 | selftests_clean turbostat_clean usb_clean virtio_clean \ | 99 | selftests_clean turbostat_clean usb_clean virtio_clean \ |
| 89 | vm_clean net_clean x86_energy_perf_policy_clean | 100 | vm_clean net_clean x86_energy_perf_policy_clean tmon_clean |
| 90 | 101 | ||
| 91 | .PHONY: FORCE | 102 | .PHONY: FORCE |
diff --git a/tools/lib/lk/debugfs.c b/tools/lib/lk/debugfs.c index 099e7cd022e4..7c4347962353 100644 --- a/tools/lib/lk/debugfs.c +++ b/tools/lib/lk/debugfs.c | |||
| @@ -5,7 +5,6 @@ | |||
| 5 | #include <stdbool.h> | 5 | #include <stdbool.h> |
| 6 | #include <sys/vfs.h> | 6 | #include <sys/vfs.h> |
| 7 | #include <sys/mount.h> | 7 | #include <sys/mount.h> |
| 8 | #include <linux/magic.h> | ||
| 9 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
| 10 | 9 | ||
| 11 | #include "debugfs.h" | 10 | #include "debugfs.h" |
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 3a0ff7fb71b6..64c043b7a438 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
| @@ -770,6 +770,7 @@ check: $(OUTPUT)common-cmds.h | |||
| 770 | install-bin: all | 770 | install-bin: all |
| 771 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' | 771 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' |
| 772 | $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)' | 772 | $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)' |
| 773 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' | ||
| 773 | $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' | 774 | $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' |
| 774 | ifndef NO_LIBPERL | 775 | ifndef NO_LIBPERL |
| 775 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' | 776 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' |
diff --git a/tools/perf/arch/x86/util/tsc.c b/tools/perf/arch/x86/util/tsc.c index 9570c2b0f83c..b2519e49424f 100644 --- a/tools/perf/arch/x86/util/tsc.c +++ b/tools/perf/arch/x86/util/tsc.c | |||
| @@ -32,7 +32,7 @@ u64 tsc_to_perf_time(u64 cyc, struct perf_tsc_conversion *tc) | |||
| 32 | int perf_read_tsc_conversion(const struct perf_event_mmap_page *pc, | 32 | int perf_read_tsc_conversion(const struct perf_event_mmap_page *pc, |
| 33 | struct perf_tsc_conversion *tc) | 33 | struct perf_tsc_conversion *tc) |
| 34 | { | 34 | { |
| 35 | bool cap_usr_time_zero; | 35 | bool cap_user_time_zero; |
| 36 | u32 seq; | 36 | u32 seq; |
| 37 | int i = 0; | 37 | int i = 0; |
| 38 | 38 | ||
| @@ -42,7 +42,7 @@ int perf_read_tsc_conversion(const struct perf_event_mmap_page *pc, | |||
| 42 | tc->time_mult = pc->time_mult; | 42 | tc->time_mult = pc->time_mult; |
| 43 | tc->time_shift = pc->time_shift; | 43 | tc->time_shift = pc->time_shift; |
| 44 | tc->time_zero = pc->time_zero; | 44 | tc->time_zero = pc->time_zero; |
| 45 | cap_usr_time_zero = pc->cap_usr_time_zero; | 45 | cap_user_time_zero = pc->cap_user_time_zero; |
| 46 | rmb(); | 46 | rmb(); |
| 47 | if (pc->lock == seq && !(seq & 1)) | 47 | if (pc->lock == seq && !(seq & 1)) |
| 48 | break; | 48 | break; |
| @@ -52,7 +52,7 @@ int perf_read_tsc_conversion(const struct perf_event_mmap_page *pc, | |||
| 52 | } | 52 | } |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | if (!cap_usr_time_zero) | 55 | if (!cap_user_time_zero) |
| 56 | return -EOPNOTSUPP; | 56 | return -EOPNOTSUPP; |
| 57 | 57 | ||
| 58 | return 0; | 58 | return 0; |
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index 423875c999b2..afe377b2884f 100644 --- a/tools/perf/builtin-inject.c +++ b/tools/perf/builtin-inject.c | |||
| @@ -321,8 +321,6 @@ found: | |||
| 321 | return perf_event__repipe(tool, event_sw, &sample_sw, machine); | 321 | return perf_event__repipe(tool, event_sw, &sample_sw, machine); |
| 322 | } | 322 | } |
| 323 | 323 | ||
| 324 | extern volatile int session_done; | ||
| 325 | |||
| 326 | static void sig_handler(int sig __maybe_unused) | 324 | static void sig_handler(int sig __maybe_unused) |
| 327 | { | 325 | { |
| 328 | session_done = 1; | 326 | session_done = 1; |
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c index c2dff9cb1f2c..9b5f077fee5b 100644 --- a/tools/perf/builtin-kmem.c +++ b/tools/perf/builtin-kmem.c | |||
| @@ -101,7 +101,7 @@ static int setup_cpunode_map(void) | |||
| 101 | 101 | ||
| 102 | dir1 = opendir(PATH_SYS_NODE); | 102 | dir1 = opendir(PATH_SYS_NODE); |
| 103 | if (!dir1) | 103 | if (!dir1) |
| 104 | return -1; | 104 | return 0; |
| 105 | 105 | ||
| 106 | while ((dent1 = readdir(dir1)) != NULL) { | 106 | while ((dent1 = readdir(dir1)) != NULL) { |
| 107 | if (dent1->d_type != DT_DIR || | 107 | |
