diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-28 02:34:10 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-28 02:34:10 -0500 |
commit | 0edbf9e55295585bbe9df61b646ca5bf80a8e1eb (patch) | |
tree | d9b6869ff7a245343a9b030511d4bfd18b00f192 /tools | |
parent | eacae5d2b940b39e7234036bf62869aff5ffe055 (diff) | |
parent | e5517c2a5a49ed5e99047008629f1cd60246ea0e (diff) |
Merge 4.9-rc7 into usb-next
We want the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 48 | ||||
-rw-r--r-- | tools/perf/util/hist.c | 12 | ||||
-rw-r--r-- | tools/power/acpi/Makefile.config | 23 | ||||
-rw-r--r-- | tools/power/acpi/Makefile.rules | 40 | ||||
-rw-r--r-- | tools/power/acpi/tools/acpidbg/Makefile | 4 | ||||
-rw-r--r-- | tools/power/acpi/tools/acpidbg/acpidbg.c | 8 | ||||
-rw-r--r-- | tools/power/acpi/tools/acpidump/Makefile | 12 |
7 files changed, 96 insertions, 51 deletions
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index 4ffff7be9299..a53fef0c673b 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c | |||
@@ -1337,8 +1337,8 @@ static int hist_browser__show_hierarchy_entry(struct hist_browser *browser, | |||
1337 | } | 1337 | } |
1338 | 1338 | ||
1339 | if (first) { | 1339 | if (first) { |
1340 | ui_browser__printf(&browser->b, "%c", folded_sign); | 1340 | ui_browser__printf(&browser->b, "%c ", folded_sign); |
1341 | width--; | 1341 | width -= 2; |
1342 | first = false; | 1342 | first = false; |
1343 | } else { | 1343 | } else { |
1344 | ui_browser__printf(&browser->b, " "); | 1344 | ui_browser__printf(&browser->b, " "); |
@@ -1361,8 +1361,10 @@ static int hist_browser__show_hierarchy_entry(struct hist_browser *browser, | |||
1361 | width -= hpp.buf - s; | 1361 | width -= hpp.buf - s; |
1362 | } | 1362 | } |
1363 | 1363 | ||
1364 | ui_browser__write_nstring(&browser->b, "", hierarchy_indent); | 1364 | if (!first) { |
1365 | width -= hierarchy_indent; | 1365 | ui_browser__write_nstring(&browser->b, "", hierarchy_indent); |
1366 | width -= hierarchy_indent; | ||
1367 | } | ||
1366 | 1368 | ||
1367 | if (column >= browser->b.horiz_scroll) { | 1369 | if (column >= browser->b.horiz_scroll) { |
1368 | char s[2048]; | 1370 | char s[2048]; |
@@ -1381,7 +1383,13 @@ static int hist_browser__show_hierarchy_entry(struct hist_browser *browser, | |||
1381 | } | 1383 | } |
1382 | 1384 | ||
1383 | perf_hpp_list__for_each_format(entry->hpp_list, fmt) { | 1385 | perf_hpp_list__for_each_format(entry->hpp_list, fmt) { |
1384 | ui_browser__write_nstring(&browser->b, "", 2); | 1386 | if (first) { |
1387 | ui_browser__printf(&browser->b, "%c ", folded_sign); | ||
1388 | first = false; | ||
1389 | } else { | ||
1390 | ui_browser__write_nstring(&browser->b, "", 2); | ||
1391 | } | ||
1392 | |||
1385 | width -= 2; | 1393 | width -= 2; |
1386 | 1394 | ||
1387 | /* | 1395 | /* |
@@ -1555,10 +1563,11 @@ static int hists_browser__scnprintf_hierarchy_headers(struct hist_browser *brows | |||
1555 | int indent = hists->nr_hpp_node - 2; | 1563 | int indent = hists->nr_hpp_node - 2; |
1556 | bool first_node, first_col; | 1564 | bool first_node, first_col; |
1557 | 1565 | ||
1558 | ret = scnprintf(buf, size, " "); | 1566 | ret = scnprintf(buf, size, " "); |
1559 | if (advance_hpp_check(&dummy_hpp, ret)) | 1567 | if (advance_hpp_check(&dummy_hpp, ret)) |
1560 | return ret; | 1568 | return ret; |
1561 | 1569 | ||
1570 | first_node = true; | ||
1562 | /* the first hpp_list_node is for overhead columns */ | 1571 | /* the first hpp_list_node is for overhead columns */ |
1563 | fmt_node = list_first_entry(&hists->hpp_formats, | 1572 | fmt_node = list_first_entry(&hists->hpp_formats, |
1564 | struct perf_hpp_list_node, list); | 1573 | struct perf_hpp_list_node, list); |
@@ -1573,12 +1582,16 @@ static int hists_browser__scnprintf_hierarchy_headers(struct hist_browser *brows | |||
1573 | ret = scnprintf(dummy_hpp.buf, dummy_hpp.size, " "); | 1582 | ret = scnprintf(dummy_hpp.buf, dummy_hpp.size, " "); |
1574 | if (advance_hpp_check(&dummy_hpp, ret)) | 1583 | if (advance_hpp_check(&dummy_hpp, ret)) |
1575 | break; | 1584 | break; |
1585 | |||
1586 | first_node = false; | ||
1576 | } | 1587 | } |
1577 | 1588 | ||
1578 | ret = scnprintf(dummy_hpp.buf, dummy_hpp.size, "%*s", | 1589 | if (!first_node) { |
1579 | indent * HIERARCHY_INDENT, ""); | 1590 | ret = scnprintf(dummy_hpp.buf, dummy_hpp.size, "%*s", |
1580 | if (advance_hpp_check(&dummy_hpp, ret)) | 1591 | indent * HIERARCHY_INDENT, ""); |
1581 | return ret; | 1592 | if (advance_hpp_check(&dummy_hpp, ret)) |
1593 | return ret; | ||
1594 | } | ||
1582 | 1595 | ||
1583 | first_node = true; | 1596 | first_node = true; |
1584 | list_for_each_entry_continue(fmt_node, &hists->hpp_formats, list) { | 1597 | list_for_each_entry_continue(fmt_node, &hists->hpp_formats, list) { |
@@ -2076,8 +2089,21 @@ void hist_browser__init(struct hist_browser *browser, | |||
2076 | browser->b.use_navkeypressed = true; | 2089 | browser->b.use_navkeypressed = true; |
2077 | browser->show_headers = symbol_conf.show_hist_headers; | 2090 | browser->show_headers = symbol_conf.show_hist_headers; |
2078 | 2091 | ||
2079 | hists__for_each_format(hists, fmt) | 2092 | if (symbol_conf.report_hierarchy) { |
2093 | struct perf_hpp_list_node *fmt_node; | ||
2094 | |||
2095 | /* count overhead columns (in the first node) */ | ||
2096 | fmt_node = list_first_entry(&hists->hpp_formats, | ||
2097 | struct perf_hpp_list_node, list); | ||
2098 | perf_hpp_list__for_each_format(&fmt_node->hpp, fmt) | ||
2099 | ++browser->b.columns; | ||
2100 | |||
2101 | /* add a single column for whole hierarchy sort keys*/ | ||
2080 | ++browser->b.columns; | 2102 | ++browser->b.columns; |
2103 | } else { | ||
2104 | hists__for_each_format(hists, fmt) | ||
2105 | ++browser->b.columns; | ||
2106 | } | ||
2081 | 2107 | ||
2082 | hists__reset_column_width(hists); | 2108 | hists__reset_column_width(hists); |
2083 | } | 2109 | } |
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index b02992efb513..a69f027368ef 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c | |||
@@ -1600,18 +1600,18 @@ static void hists__hierarchy_output_resort(struct hists *hists, | |||
1600 | if (prog) | 1600 | if (prog) |
1601 | ui_progress__update(prog, 1); | 1601 | ui_progress__update(prog, 1); |
1602 | 1602 | ||
1603 | hists->nr_entries++; | ||
1604 | if (!he->filtered) { | ||
1605 | hists->nr_non_filtered_entries++; | ||
1606 | hists__calc_col_len(hists, he); | ||
1607 | } | ||
1608 | |||
1603 | if (!he->leaf) { | 1609 | if (!he->leaf) { |
1604 | hists__hierarchy_output_resort(hists, prog, | 1610 | hists__hierarchy_output_resort(hists, prog, |
1605 | &he->hroot_in, | 1611 | &he->hroot_in, |
1606 | &he->hroot_out, | 1612 | &he->hroot_out, |
1607 | min_callchain_hits, | 1613 | min_callchain_hits, |
1608 | use_callchain); | 1614 | use_callchain); |
1609 | hists->nr_entries++; | ||
1610 | if (!he->filtered) { | ||
1611 | hists->nr_non_filtered_entries++; | ||
1612 | hists__calc_col_len(hists, he); | ||
1613 | } | ||
1614 | |||
1615 | continue; | 1615 | continue; |
1616 | } | 1616 | } |
1617 | 1617 | ||
diff --git a/tools/power/acpi/Makefile.config b/tools/power/acpi/Makefile.config index a538ff44b108..a1883bbb0144 100644 --- a/tools/power/acpi/Makefile.config +++ b/tools/power/acpi/Makefile.config | |||
@@ -8,18 +8,19 @@ | |||
8 | # as published by the Free Software Foundation; version 2 | 8 | # as published by the Free Software Foundation; version 2 |
9 | # of the License. | 9 | # of the License. |
10 | 10 | ||
11 | include ../../../../scripts/Makefile.include | 11 | ifeq ($(srctree),) |
12 | 12 | srctree := $(patsubst %/,%,$(dir $(shell pwd))) | |
13 | OUTPUT=./ | 13 | srctree := $(patsubst %/,%,$(dir $(srctree))) |
14 | ifeq ("$(origin O)", "command line") | 14 | #$(info Determined 'srctree' to be $(srctree)) |
15 | OUTPUT := $(O)/ | ||
16 | endif | 15 | endif |
17 | 16 | ||
18 | ifneq ($(OUTPUT),) | 17 | include $(srctree)/../../scripts/Makefile.include |
19 | # check that the output directory actually exists | 18 | |
20 | OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd) | 19 | OUTPUT=$(srctree)/ |
21 | $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) | 20 | ifeq ("$(origin O)", "command line") |
21 | OUTPUT := $(O)/power/acpi/ | ||
22 | endif | 22 | endif |
23 | #$(info Determined 'OUTPUT' to be $(OUTPUT)) | ||
23 | 24 | ||
24 | # --- CONFIGURATION BEGIN --- | 25 | # --- CONFIGURATION BEGIN --- |
25 | 26 | ||
@@ -70,8 +71,8 @@ WARNINGS := -Wall | |||
70 | WARNINGS += $(call cc-supports,-Wstrict-prototypes) | 71 | WARNINGS += $(call cc-supports,-Wstrict-prototypes) |
71 | WARNINGS += $(call cc-supports,-Wdeclaration-after-statement) | 72 | WARNINGS += $(call cc-supports,-Wdeclaration-after-statement) |
72 | 73 | ||
73 | KERNEL_INCLUDE := ../../../include | 74 | KERNEL_INCLUDE := $(OUTPUT)include |
74 | ACPICA_INCLUDE := ../../../drivers/acpi/acpica | 75 | ACPICA_INCLUDE := $(srctree)/../../../drivers/acpi/acpica |
75 | CFLAGS += -D_LINUX -I$(KERNEL_INCLUDE) -I$(ACPICA_INCLUDE) | 76 | CFLAGS += -D_LINUX -I$(KERNEL_INCLUDE) -I$(ACPICA_INCLUDE) |
76 | CFLAGS += $(WARNINGS) | 77 | CFLAGS += $(WARNINGS) |
77 | 78 | ||
diff --git a/tools/power/acpi/Makefile.rules b/tools/power/acpi/Makefile.rules index ec87a9e562c0..373738338f51 100644 --- a/tools/power/acpi/Makefile.rules +++ b/tools/power/acpi/Makefile.rules | |||
@@ -8,28 +8,42 @@ | |||
8 | # as published by the Free Software Foundation; version 2 | 8 | # as published by the Free Software Foundation; version 2 |
9 | # of the License. | 9 | # of the License. |
10 | 10 | ||
11 | $(OUTPUT)$(TOOL): $(TOOL_OBJS) FORCE | 11 | objdir := $(OUTPUT)tools/$(TOOL)/ |
12 | $(ECHO) " LD " $@ | 12 | toolobjs := $(addprefix $(objdir),$(TOOL_OBJS)) |
13 | $(QUIET) $(LD) $(CFLAGS) $(LDFLAGS) $(TOOL_OBJS) -L$(OUTPUT) -o $@ | 13 | $(OUTPUT)$(TOOL): $(toolobjs) FORCE |
14 | $(ECHO) " LD " $(subst $(OUTPUT),,$@) | ||
15 | $(QUIET) $(LD) $(CFLAGS) $(LDFLAGS) $(toolobjs) -L$(OUTPUT) -o $@ | ||
16 | $(ECHO) " STRIP " $(subst $(OUTPUT),,$@) | ||
14 | $(QUIET) $(STRIPCMD) $@ | 17 | $(QUIET) $(STRIPCMD) $@ |
15 | 18 | ||
16 | $(OUTPUT)%.o: %.c | 19 | $(KERNEL_INCLUDE): |
17 | $(ECHO) " CC " $@ | 20 | $(ECHO) " MKDIR " $(subst $(OUTPUT),,$@) |
21 | $(QUIET) mkdir -p $(KERNEL_INCLUDE) | ||
22 | $(ECHO) " CP " $(subst $(OUTPUT),,$@) | ||
23 | $(QUIET) cp -rf $(srctree)/../../../include/acpi $(KERNEL_INCLUDE)/ | ||
24 | |||
25 | $(objdir)%.o: %.c $(KERNEL_INCLUDE) | ||
26 | $(ECHO) " CC " $(subst $(OUTPUT),,$@) | ||
18 | $(QUIET) $(CC) -c $(CFLAGS) -o $@ $< | 27 | $(QUIET) $(CC) -c $(CFLAGS) -o $@ $< |
19 | 28 | ||
20 | all: $(OUTPUT)$(TOOL) | 29 | all: $(OUTPUT)$(TOOL) |
21 | clean: | 30 | clean: |
22 | -find $(OUTPUT) \( -not -type d \) \ | 31 | $(ECHO) " RMOBJ " $(subst $(OUTPUT),,$(objdir)) |
23 | -and \( -name '*~' -o -name '*.[oas]' \) \ | 32 | $(QUIET) find $(objdir) \( -not -type d \)\ |
24 | -type f -print \ | 33 | -and \( -name '*~' -o -name '*.[oas]' \)\ |
25 | | xargs rm -f | 34 | -type f -print | xargs rm -f |
26 | -rm -f $(OUTPUT)$(TOOL) | 35 | $(ECHO) " RM " $(TOOL) |
36 | $(QUIET) rm -f $(OUTPUT)$(TOOL) | ||
37 | $(ECHO) " RMINC " $(subst $(OUTPUT),,$(KERNEL_INCLUDE)) | ||
38 | $(QUIET) rm -rf $(KERNEL_INCLUDE) | ||
27 | 39 | ||
28 | install-tools: | 40 | install-tools: |
29 | $(INSTALL) -d $(DESTDIR)${sbindir} | 41 | $(ECHO) " INST " $(TOOL) |
30 | $(INSTALL_PROGRAM) $(OUTPUT)$(TOOL) $(DESTDIR)${sbindir} | 42 | $(QUIET) $(INSTALL) -d $(DESTDIR)$(sbindir) |
43 | $(QUIET) $(INSTALL_PROGRAM) $(OUTPUT)$(TOOL) $(DESTDIR)$(sbindir) | ||
31 | uninstall-tools: | 44 | uninstall-tools: |
32 | - rm -f $(DESTDIR)${sbindir}/$(TOOL) | 45 | $(ECHO) " UNINST " $(TOOL) |
46 | $(QUIET) rm -f $(DESTDIR)$(sbindir)/$(TOOL) | ||
33 | 47 | ||
34 | install: all install-tools $(EXTRA_INSTALL) | 48 | install: all install-tools $(EXTRA_INSTALL) |
35 | uninstall: uninstall-tools $(EXTRA_UNINSTALL) | 49 | uninstall: uninstall-tools $(EXTRA_UNINSTALL) |
diff --git a/tools/power/acpi/tools/acpidbg/Makefile b/tools/power/acpi/tools/acpidbg/Makefile index 352df4b41ae9..f2d06e773eb4 100644 --- a/tools/power/acpi/tools/acpidbg/Makefile +++ b/tools/power/acpi/tools/acpidbg/Makefile | |||
@@ -17,9 +17,7 @@ vpath %.c \ | |||
17 | ../../os_specific/service_layers\ | 17 | ../../os_specific/service_layers\ |
18 | . | 18 | . |
19 | CFLAGS += -DACPI_APPLICATION -DACPI_SINGLE_THREAD -DACPI_DEBUGGER\ | 19 | CFLAGS += -DACPI_APPLICATION -DACPI_SINGLE_THREAD -DACPI_DEBUGGER\ |
20 | -I.\ | 20 | -I. |
21 | -I../../../../../drivers/acpi/acpica\ | ||
22 | -I../../../../../include | ||
23 | LDFLAGS += -lpthread | 21 | LDFLAGS += -lpthread |
24 | TOOL_OBJS = \ | 22 | TOOL_OBJS = \ |
25 | acpidbg.o | 23 | acpidbg.o |
diff --git a/tools/power/acpi/tools/acpidbg/acpidbg.c b/tools/power/acpi/tools/acpidbg/acpidbg.c index a88ac45b7756..4308362d7068 100644 --- a/tools/power/acpi/tools/acpidbg/acpidbg.c +++ b/tools/power/acpi/tools/acpidbg/acpidbg.c | |||
@@ -12,10 +12,16 @@ | |||
12 | #include <acpi/acpi.h> | 12 | #include <acpi/acpi.h> |
13 | 13 | ||
14 | /* Headers not included by include/acpi/platform/aclinux.h */ | 14 | /* Headers not included by include/acpi/platform/aclinux.h */ |
15 | #include <unistd.h> | ||
16 | #include <stdio.h> | ||
17 | #include <stdlib.h> | ||
18 | #include <string.h> | ||
19 | #include <error.h> | ||
15 | #include <stdbool.h> | 20 | #include <stdbool.h> |
16 | #include <fcntl.h> | 21 | #include <fcntl.h> |
17 | #include <assert.h> | 22 | #include <assert.h> |
18 | #include <linux/circ_buf.h> | 23 | #include <sys/select.h> |
24 | #include "../../../../../include/linux/circ_buf.h" | ||
19 | 25 | ||
20 | #define ACPI_AML_FILE "/sys/kernel/debug/acpi/acpidbg" | 26 | #define ACPI_AML_FILE "/sys/kernel/debug/acpi/acpidbg" |
21 | #define ACPI_AML_SEC_TICK 1 | 27 | #define ACPI_AML_SEC_TICK 1 |
diff --git a/tools/power/acpi/tools/acpidump/Makefile b/tools/power/acpi/tools/acpidump/Makefile index 04b5db7c7c0b..f7c7af1f9258 100644 --- a/tools/power/acpi/tools/acpidump/Makefile +++ b/tools/power/acpi/tools/acpidump/Makefile | |||
@@ -19,9 +19,7 @@ vpath %.c \ | |||
19 | ./\ | 19 | ./\ |
20 | ../../common\ | 20 | ../../common\ |
21 | ../../os_specific/service_layers | 21 | ../../os_specific/service_layers |
22 | CFLAGS += -DACPI_DUMP_APP -I.\ | 22 | CFLAGS += -DACPI_DUMP_APP -I. |
23 | -I../../../../../drivers/acpi/acpica\ | ||
24 | -I../../../../../include | ||
25 | TOOL_OBJS = \ | 23 | TOOL_OBJS = \ |
26 | apdump.o\ | 24 | apdump.o\ |
27 | apfiles.o\ | 25 | apfiles.o\ |
@@ -49,7 +47,9 @@ TOOL_OBJS = \ | |||
49 | 47 | ||
50 | include ../../Makefile.rules | 48 | include ../../Makefile.rules |
51 | 49 | ||
52 | install-man: ../../man/acpidump.8 | 50 | install-man: $(srctree)/man/acpidump.8 |
53 | $(INSTALL_DATA) -D $< $(DESTDIR)${mandir}/man8/acpidump.8 | 51 | $(ECHO) " INST " acpidump.8 |
52 | $(QUIET) $(INSTALL_DATA) -D $< $(DESTDIR)$(mandir)/man8/acpidump.8 | ||
54 | uninstall-man: | 53 | uninstall-man: |
55 | - rm -f $(DESTDIR)${mandir}/man8/acpidump.8 | 54 | $(ECHO) " UNINST " acpidump.8 |
55 | $(QUIET) rm -f $(DESTDIR)$(mandir)/man8/acpidump.8 | ||