diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-10-25 09:47:19 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-10-25 09:47:35 -0400 |
commit | 2adca5672ffe3121bbb3bd061af9f047e0f8023f (patch) | |
tree | 01825a2f14c8d640509c39967ff9d461eaacea2f /tools/perf | |
parent | b6442559952ccd931415923b4a5866f5c0e7e781 (diff) | |
parent | 08d04a135a1c2e24c4d4bc7bbafee5e0e58f80c6 (diff) |
Merge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes
From Nicolas Ferre <nicolas.ferre@atmel.com>:
A mix of typos and critical fixes.
The most important ones are a duplicated definition of a Kconfig
variable and the handling of external interrupts for non-DT case.
The new at91sam9g10 was suffering a recognition issue due to an ID
mis-interpreted: this was leading to a kernel panic.
* tag 'at91-fixes' of git://github.com/at91linux/linux-at91: (257 commits)
ARM: at91: drop duplicated config SOC_AT91SAM9 entry
ARM: at91/i2c: change id to let i2c-at91 work
ARM: at91/i2c: change id to let i2c-gpio work
ARM: at91/dts: at91sam9g20ek_common: Fix typos in buttons labels.
ARM: at91: fix external interrupt specification in board code
ARM: at91: fix external interrupts in non-DT case
ARM: at91: at91sam9g10: fix SOC type detection
ARM: at91/tc: fix typo in the DT document
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/Makefile | 24 | ||||
-rw-r--r-- | tools/perf/perf.h | 2 | ||||
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 6 | ||||
-rw-r--r-- | tools/perf/util/parse-events.c | 3 | ||||
-rw-r--r-- | tools/perf/util/setup.py | 2 | ||||
-rw-r--r-- | tools/perf/util/sort.c | 6 |
6 files changed, 29 insertions, 14 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index f7c968ad5178..00deed4d6159 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -184,9 +184,22 @@ SCRIPT_SH += perf-archive.sh | |||
184 | grep-libs = $(filter -l%,$(1)) | 184 | grep-libs = $(filter -l%,$(1)) |
185 | strip-libs = $(filter-out -l%,$(1)) | 185 | strip-libs = $(filter-out -l%,$(1)) |
186 | 186 | ||
187 | TRACE_EVENT_DIR = ../lib/traceevent/ | ||
188 | |||
189 | ifneq ($(OUTPUT),) | ||
190 | TE_PATH=$(OUTPUT) | ||
191 | else | ||
192 | TE_PATH=$(TRACE_EVENT_DIR) | ||
193 | endif | ||
194 | |||
195 | LIBTRACEEVENT = $(TE_PATH)libtraceevent.a | ||
196 | TE_LIB := -L$(TE_PATH) -ltraceevent | ||
197 | |||
187 | PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) | 198 | PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) |
188 | PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py | 199 | PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py |
189 | 200 | ||
201 | export LIBTRACEEVENT | ||
202 | |||
190 | $(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) | 203 | $(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) |
191 | $(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \ | 204 | $(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \ |
192 | --quiet build_ext; \ | 205 | --quiet build_ext; \ |
@@ -198,17 +211,6 @@ $(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) | |||
198 | 211 | ||
199 | SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) | 212 | SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) |
200 | 213 | ||
201 | TRACE_EVENT_DIR = ../lib/traceevent/ | ||
202 | |||
203 | ifneq ($(OUTPUT),) | ||
204 | TE_PATH=$(OUTPUT) | ||
205 | else | ||
206 | TE_PATH=$(TRACE_EVENT_DIR) | ||
207 | endif | ||
208 | |||
209 | LIBTRACEEVENT = $(TE_PATH)libtraceevent.a | ||
210 | TE_LIB := -L$(TE_PATH) -ltraceevent | ||
211 | |||
212 | # | 214 | # |
213 | # Single 'perf' binary right now: | 215 | # Single 'perf' binary right now: |
214 | # | 216 | # |
diff --git a/tools/perf/perf.h b/tools/perf/perf.h index 276287783a03..c50985eaec41 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h | |||
@@ -57,7 +57,7 @@ void get_term_dimensions(struct winsize *ws); | |||
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | #ifdef __sparc__ | 59 | #ifdef __sparc__ |
60 | #include "../../arch/sparc/include/asm/unistd.h" | 60 | #include "../../arch/sparc/include/uapi/asm/unistd.h" |
61 | #define rmb() asm volatile("":::"memory") | 61 | #define rmb() asm volatile("":::"memory") |
62 | #define cpu_relax() asm volatile("":::"memory") | 62 | #define cpu_relax() asm volatile("":::"memory") |
63 | #define CPUINFO_PROC "cpu" | 63 | #define CPUINFO_PROC "cpu" |
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index 0568536ecf67..ef2f93ca7496 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c | |||
@@ -610,6 +610,7 @@ static int hist_browser__show_entry(struct hist_browser *browser, | |||
610 | char folded_sign = ' '; | 610 | char folded_sign = ' '; |
611 | bool current_entry = ui_browser__is_current_entry(&browser->b, row); | 611 | bool current_entry = ui_browser__is_current_entry(&browser->b, row); |
612 | off_t row_offset = entry->row_offset; | 612 | off_t row_offset = entry->row_offset; |
613 | bool first = true; | ||
613 | 614 | ||
614 | if (current_entry) { | 615 | if (current_entry) { |
615 | browser->he_selection = entry; | 616 | browser->he_selection = entry; |
@@ -633,10 +634,11 @@ static int hist_browser__show_entry(struct hist_browser *browser, | |||
633 | if (!perf_hpp__format[i].cond) | 634 | if (!perf_hpp__format[i].cond) |
634 | continue; | 635 | continue; |
635 | 636 | ||
636 | if (i) { | 637 | if (!first) { |
637 | slsmg_printf(" "); | 638 | slsmg_printf(" "); |
638 | width -= 2; | 639 | width -= 2; |
639 | } | 640 | } |
641 | first = false; | ||
640 | 642 | ||
641 | if (perf_hpp__format[i].color) { | 643 | if (perf_hpp__format[i].color) { |
642 | hpp.ptr = &percent; | 644 | hpp.ptr = &percent; |
@@ -645,7 +647,7 @@ static int hist_browser__show_entry(struct hist_browser *browser, | |||
645 | 647 | ||
646 | ui_browser__set_percent_color(&browser->b, percent, current_entry); | 648 | ui_browser__set_percent_color(&browser->b, percent, current_entry); |
647 | 649 | ||
648 | if (i == 0 && symbol_conf.use_callchain) { | 650 | if (i == PERF_HPP__OVERHEAD && symbol_conf.use_callchain) { |
649 | slsmg_printf("%c ", folded_sign); | 651 | slsmg_printf("%c ", folded_sign); |
650 | width -= 2; | 652 | width -= 2; |
651 | } | 653 | } |
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index aed38e4b9dfa..75c7b0fca6d9 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c | |||
@@ -690,6 +690,9 @@ static int get_event_modifier(struct event_modifier *mod, char *str, | |||
690 | eH = 0; | 690 | eH = 0; |
691 | } else if (*str == 'p') { | 691 | } else if (*str == 'p') { |
692 | precise++; | 692 | precise++; |
693 | /* use of precise requires exclude_guest */ | ||
694 | if (!exclude_GH) | ||
695 | eG = 1; | ||
693 | } else | 696 | } else |
694 | break; | 697 | break; |
695 | 698 | ||
diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py index d0f9f29cf181..73d510269784 100644 --- a/tools/perf/util/setup.py +++ b/tools/perf/util/setup.py | |||
@@ -23,6 +23,7 @@ cflags += getenv('CFLAGS', '').split() | |||
23 | 23 | ||
24 | build_lib = getenv('PYTHON_EXTBUILD_LIB') | 24 | build_lib = getenv('PYTHON_EXTBUILD_LIB') |
25 | build_tmp = getenv('PYTHON_EXTBUILD_TMP') | 25 | build_tmp = getenv('PYTHON_EXTBUILD_TMP') |
26 | libtraceevent = getenv('LIBTRACEEVENT') | ||
26 | 27 | ||
27 | ext_sources = [f.strip() for f in file('util/python-ext-sources') | 28 | ext_sources = [f.strip() for f in file('util/python-ext-sources') |
28 | if len(f.strip()) > 0 and f[0] != '#'] | 29 | if len(f.strip()) > 0 and f[0] != '#'] |
@@ -31,6 +32,7 @@ perf = Extension('perf', | |||
31 | sources = ext_sources, | 32 | sources = ext_sources, |
32 | include_dirs = ['util/include'], | 33 | include_dirs = ['util/include'], |
33 | extra_compile_args = cflags, | 34 | extra_compile_args = cflags, |
35 | extra_objects = [libtraceevent], | ||
34 | ) | 36 | ) |
35 | 37 | ||
36 | setup(name='perf', | 38 | setup(name='perf', |
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index b5b1b9211960..cfd1c0feb32d 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c | |||
@@ -260,6 +260,12 @@ static int hist_entry__srcline_snprintf(struct hist_entry *self, char *bf, | |||
260 | if (path != NULL) | 260 | if (path != NULL) |
261 | goto out_path; | 261 | goto out_path; |
262 | 262 | ||
263 | if (!self->ms.map) | ||
264 | goto out_ip; | ||
265 | |||
266 | if (!strncmp(self->ms.map->dso->long_name, "/tmp/perf-", 10)) | ||
267 | goto out_ip; | ||
268 | |||
263 | snprintf(cmd, sizeof(cmd), "addr2line -e %s %016" PRIx64, | 269 | snprintf(cmd, sizeof(cmd), "addr2line -e %s %016" PRIx64, |
264 | self->ms.map->dso->long_name, self->ip); | 270 | self->ms.map->dso->long_name, self->ip); |
265 | fp = popen(cmd, "r"); | 271 | fp = popen(cmd, "r"); |