diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2014-06-04 07:09:01 -0400 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2014-06-04 07:09:01 -0400 |
| commit | af5666e0f76023d9c296016024297903a4c83108 (patch) | |
| tree | 9397e7a41dd3eb0c0e14a6407a8e8f12abed4fc5 /tools/perf | |
| parent | 1b15d2e5b8077670b1e6a33250a0d9577efff4a5 (diff) | |
| parent | 368c96640d10a145da5f258f2d2833668d4f3629 (diff) | |
Merge branches 'for-3.15/upstream-fixes' and 'for-3.16/upstream' into for-linus
Conflicts:
drivers/hid/hid-sensor-hub.c
Diffstat (limited to 'tools/perf')
| -rw-r--r-- | tools/perf/Documentation/perf-bench.txt | 22 | ||||
| -rw-r--r-- | tools/perf/Documentation/perf-top.txt | 1 | ||||
| -rw-r--r-- | tools/perf/Makefile.perf | 4 | ||||
| -rw-r--r-- | tools/perf/bench/numa.c | 4 | ||||
| -rw-r--r-- | tools/perf/builtin-stat.c | 11 | ||||
| -rw-r--r-- | tools/perf/config/Makefile | 7 | ||||
| -rw-r--r-- | tools/perf/config/Makefile.arch | 3 | ||||
| -rw-r--r-- | tools/perf/perf.h | 8 | ||||
| -rw-r--r-- | tools/perf/tests/code-reading.c | 1 | ||||
| -rw-r--r-- | tools/perf/util/probe-finder.c | 15 |
10 files changed, 61 insertions, 15 deletions
diff --git a/tools/perf/Documentation/perf-bench.txt b/tools/perf/Documentation/perf-bench.txt index 7065cd6fbdfc..4464ad770d51 100644 --- a/tools/perf/Documentation/perf-bench.txt +++ b/tools/perf/Documentation/perf-bench.txt | |||
| @@ -48,6 +48,12 @@ SUBSYSTEM | |||
| 48 | 'mem':: | 48 | 'mem':: |
| 49 | Memory access performance. | 49 | Memory access performance. |
| 50 | 50 | ||
| 51 | 'numa':: | ||
| 52 | NUMA scheduling and MM benchmarks. | ||
| 53 | |||
| 54 | 'futex':: | ||
| 55 | Futex stressing benchmarks. | ||
| 56 | |||
| 51 | 'all':: | 57 | 'all':: |
| 52 | All benchmark subsystems. | 58 | All benchmark subsystems. |
| 53 | 59 | ||
| @@ -187,6 +193,22 @@ Show only the result with page faults before memset. | |||
| 187 | --no-prefault:: | 193 | --no-prefault:: |
| 188 | Show only the result without page faults before memset. | 194 | Show only the result without page faults before memset. |
| 189 | 195 | ||
| 196 | SUITES FOR 'numa' | ||
| 197 | ~~~~~~~~~~~~~~~~~ | ||
| 198 | *mem*:: | ||
| 199 | Suite for evaluating NUMA workloads. | ||
| 200 | |||
| 201 | SUITES FOR 'futex' | ||
| 202 | ~~~~~~~~~~~~~~~~~~ | ||
| 203 | *hash*:: | ||
| 204 | Suite for evaluating hash tables. | ||
| 205 | |||
| 206 | *wake*:: | ||
| 207 | Suite for evaluating wake calls. | ||
| 208 | |||
| 209 | *requeue*:: | ||
| 210 | Suite for evaluating requeue calls. | ||
| 211 | |||
| 190 | SEE ALSO | 212 | SEE ALSO |
| 191 | -------- | 213 | -------- |
| 192 | linkperf:perf[1] | 214 | linkperf:perf[1] |
diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt index cdd8d4946dba..976b00c6cdb1 100644 --- a/tools/perf/Documentation/perf-top.txt +++ b/tools/perf/Documentation/perf-top.txt | |||
| @@ -87,7 +87,6 @@ Default is to monitor all CPUS. | |||
| 87 | --realtime=<priority>:: | 87 | --realtime=<priority>:: |
| 88 | Collect data with this RT SCHED_FIFO priority. | 88 | Collect data with this RT SCHED_FIFO priority. |
| 89 | 89 | ||
| 90 | -s <symbol>:: | ||
| 91 | --sym-annotate=<symbol>:: | 90 | --sym-annotate=<symbol>:: |
| 92 | Annotate this symbol. | 91 | Annotate this symbol. |
| 93 | 92 | ||
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 50d875d970c4..e96923310d57 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf | |||
| @@ -192,13 +192,13 @@ endif | |||
| 192 | export PERL_PATH | 192 | export PERL_PATH |
| 193 | 193 | ||
| 194 | $(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c | 194 | $(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c |
| 195 | $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c | 195 | $(QUIET_FLEX)$(FLEX) -o $@ --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) util/parse-events.l |
| 196 | 196 | ||
| 197 | $(OUTPUT)util/parse-events-bison.c: util/parse-events.y | 197 | $(OUTPUT)util/parse-events-bison.c: util/parse-events.y |
| 198 | $(QUIET_BISON)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $(OUTPUT)util/parse-events-bison.c -p parse_events_ | 198 | $(QUIET_BISON)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $(OUTPUT)util/parse-events-bison.c -p parse_events_ |
| 199 | 199 | ||
| 200 | $(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c | 200 | $(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c |
| 201 | $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/pmu-flex.h -t util/pmu.l > $(OUTPUT)util/pmu-flex.c | 201 | $(QUIET_FLEX)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l |
| 202 | 202 | ||
| 203 | $(OUTPUT)util/pmu-bison.c: util/pmu.y | 203 | $(OUTPUT)util/pmu-bison.c: util/pmu.y |
| 204 | $(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c -p perf_pmu_ | 204 | $(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c -p perf_pmu_ |
diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c index 97d86d828190..ebfa163b80b5 100644 --- a/tools/perf/bench/numa.c +++ b/tools/perf/bench/numa.c | |||
| @@ -1593,6 +1593,10 @@ static void init_params(struct params *p, const char *name, int argc, const char | |||
| 1593 | p->data_rand_walk = true; | 1593 | p->data_rand_walk = true; |
| 1594 | p->nr_loops = -1; | 1594 | p->nr_loops = -1; |
| 1595 | p->init_random = true; | 1595 | p->init_random = true; |
| 1596 | p->mb_global_str = "1"; | ||
| 1597 | p->nr_proc = 1; | ||
| 1598 | p->nr_threads = 1; | ||
| 1599 | p->nr_secs = 5; | ||
| 1596 | p->run_all = argc == 1; | 1600 | p->run_all = argc == 1; |
| 1597 | } | 1601 | } |
| 1598 | 1602 | ||
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 8b0e1c9234d9..65a151e36067 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
| @@ -174,13 +174,20 @@ static inline int perf_evsel__nr_cpus(struct perf_evsel *evsel) | |||
| 174 | 174 | ||
| 175 | static void perf_evsel__reset_stat_priv(struct perf_evsel *evsel) | 175 | static void perf_evsel__reset_stat_priv(struct perf_evsel *evsel) |
| 176 | { | 176 | { |
| 177 | memset(evsel->priv, 0, sizeof(struct perf_stat)); | 177 | int i; |
| 178 | struct perf_stat *ps = evsel->priv; | ||
| 179 | |||
| 180 | for (i = 0; i < 3; i++) | ||
| 181 | init_stats(&ps->res_stats[i]); | ||
| 178 | } | 182 | } |
| 179 | 183 | ||
| 180 | static int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel) | 184 | static int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel) |
| 181 | { | 185 | { |
| 182 | evsel->priv = zalloc(sizeof(struct perf_stat)); | 186 | evsel->priv = zalloc(sizeof(struct perf_stat)); |
| 183 | return evsel->priv == NULL ? -ENOMEM : 0; | 187 | if (evsel == NULL) |
| 188 | return -ENOMEM; | ||
| 189 | perf_evsel__reset_stat_priv(evsel); | ||
| 190 | return 0; | ||
| 184 | } | 191 | } |
| 185 | 192 | ||
| 186 | static void perf_evsel__free_stat_priv(struct perf_evsel *evsel) | 193 | static void perf_evsel__free_stat_priv(struct perf_evsel *evsel) |
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index c23418225c2c..ee21fa95ebcf 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
| @@ -65,10 +65,9 @@ ifndef NO_LIBELF | |||
| 65 | ifdef LIBDW_DIR | 65 | ifdef LIBDW_DIR |
| 66 | LIBDW_CFLAGS := -I$(LIBDW_DIR)/include | 66 | LIBDW_CFLAGS := -I$(LIBDW_DIR)/include |
| 67 | LIBDW_LDFLAGS := -L$(LIBDW_DIR)/lib | 67 | LIBDW_LDFLAGS := -L$(LIBDW_DIR)/lib |
| 68 | |||
| 69 | FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS) | ||
| 70 | FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) -ldw | ||
| 71 | endif | 68 | endif |
| 69 | FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS) | ||
| 70 | FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) -ldw | ||
| 72 | endif | 71 | endif |
| 73 | 72 | ||
| 74 | # include ARCH specific config | 73 | # include ARCH specific config |
| @@ -278,6 +277,8 @@ else | |||
| 278 | NO_LIBELF := 1 | 277 | NO_LIBELF := 1 |
| 279 | NO_DWARF := 1 | 278 | NO_DWARF := 1 |
| 280 | NO_DEMANGLE := 1 | 279 | NO_DEMANGLE := 1 |
| 280 | NO_LIBUNWIND := 1 | ||
| 281 | NO_LIBDW_DWARF_UNWIND := 1 | ||
| 281 | else | 282 | else |
| 282 | msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static); | 283 | msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static); |
| 283 | endif | 284 | endif |
diff --git a/tools/perf/config/Makefile.arch b/tools/perf/config/Makefile.arch index fef8ae922800..4b06719ee984 100644 --- a/tools/perf/config/Makefile.arch +++ b/tools/perf/config/Makefile.arch | |||
| @@ -5,7 +5,8 @@ ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ | |||
| 5 | -e s/arm.*/arm/ -e s/sa110/arm/ \ | 5 | -e s/arm.*/arm/ -e s/sa110/arm/ \ |
| 6 | -e s/s390x/s390/ -e s/parisc64/parisc/ \ | 6 | -e s/s390x/s390/ -e s/parisc64/parisc/ \ |
| 7 | -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ | 7 | -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ |
| 8 | -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ ) | 8 | -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \ |
| 9 | -e s/tile.*/tile/ ) | ||
| 9 | 10 | ||
| 10 | # Additional ARCH settings for x86 | 11 | # Additional ARCH settings for x86 |
| 11 | ifeq ($(ARCH),i386) | 12 | ifeq ($(ARCH),i386) |
diff --git a/tools/perf/perf.h b/tools/perf/perf.h index e18a8b5e6953..5c11ecad02a9 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h | |||
| @@ -145,6 +145,14 @@ | |||
| 145 | #define CPUINFO_PROC "core ID" | 145 | #define CPUINFO_PROC "core ID" |
| 146 | #endif | 146 | #endif |
| 147 | 147 | ||
| 148 | #ifdef __tile__ | ||
| 149 | #define mb() asm volatile ("mf" ::: "memory") | ||
| 150 | #define wmb() asm volatile ("mf" ::: "memory") | ||
| 151 | #define rmb() asm volatile ("mf" ::: "memory") | ||
| 152 | #define cpu_relax() asm volatile ("mfspr zero, PASS" ::: "memory") | ||
| 153 | #define CPUINFO_PROC "model name" | ||
| 154 | #endif | ||
| 155 | |||
| 148 | #define barrier() asm volatile ("" ::: "memory") | 156 | #define barrier() asm volatile ("" ::: "memory") |
| 149 | 157 | ||
| 150 | #ifndef cpu_relax | 158 | #ifndef cpu_relax |
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c index 653a8fe2db95..bfb186900ac0 100644 --- a/tools/perf/tests/code-reading.c +++ b/tools/perf/tests/code-reading.c | |||
| @@ -504,6 +504,7 @@ static int do_test_code_reading(bool try_kcore) | |||
| 504 | if (ret < 0) { | 504 | if (ret < 0) { |
| 505 | if (!excl_kernel) { | 505 | if (!excl_kernel) { |
| 506 | excl_kernel = true; | 506 | excl_kernel = true; |
| 507 | perf_evlist__set_maps(evlist, NULL, NULL); | ||
| 507 | perf_evlist__delete(evlist); | 508 | perf_evlist__delete(evlist); |
| 508 | evlist = NULL; | 509 | evlist = NULL; |
| 509 | continue; | 510 | continue; |
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index df0238654698..562762117639 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c | |||
| @@ -985,7 +985,7 @@ static int debuginfo__find_probes(struct debuginfo *dbg, | |||
| 985 | 985 | ||
| 986 | #if _ELFUTILS_PREREQ(0, 142) | 986 | #if _ELFUTILS_PREREQ(0, 142) |
| 987 | /* Get the call frame information from this dwarf */ | 987 | /* Get the call frame information from this dwarf */ |
| 988 | pf->cfi = dwarf_getcfi(dbg->dbg); | 988 | pf->cfi = dwarf_getcfi_elf(dwarf_getelf(dbg->dbg)); |
| 989 | #endif | 989 | #endif |
| 990 | 990 | ||
| 991 | off = 0; | 991 | off = 0; |
| @@ -1441,13 +1441,15 @@ static int line_range_walk_cb(const char *fname, int lineno, | |||
| 1441 | void *data) | 1441 | void *data) |
| 1442 | { | 1442 | { |
| 1443 | struct line_finder *lf = data; | 1443 | struct line_finder *lf = data; |
| 1444 | int err; | ||
| 1444 | 1445 | ||
| 1445 | if ((strtailcmp(fname, lf->fname) != 0) || | 1446 | if ((strtailcmp(fname, lf->fname) != 0) || |
| 1446 | (lf->lno_s > lineno || lf->lno_e < lineno)) | 1447 | (lf->lno_s > lineno || lf->lno_e < lineno)) |
| 1447 | return 0; | 1448 | return 0; |
| 1448 | 1449 | ||
| 1449 | if (line_range_add_line(fname, lineno, lf->lr) < 0) | 1450 | err = line_range_add_line(fname, lineno, lf->lr); |
| 1450 | return -EINVAL; | 1451 | if (err < 0 && err != -EEXIST) |
| 1452 | return err; | ||
| 1451 | 1453 | ||
| 1452 | return 0; | 1454 | return 0; |
| 1453 | } | 1455 | } |
| @@ -1473,14 +1475,15 @@ static int find_line_range_by_line(Dwarf_Die *sp_die, struct line_finder *lf) | |||
| 1473 | 1475 | ||
| 1474 | static int line_range_inline_cb(Dwarf_Die *in_die, void *data) | 1476 | static int line_range_inline_cb(Dwarf_Die *in_die, void *data) |
| 1475 | { | 1477 | { |
| 1476 | find_line_range_by_line(in_die, data); | 1478 | int ret = find_line_range_by_line(in_die, data); |
| 1477 | 1479 | ||
| 1478 | /* | 1480 | /* |
| 1479 | * We have to check all instances of inlined function, because | 1481 | * We have to check all instances of inlined function, because |
| 1480 | * some execution paths can be optimized out depends on the | 1482 | * some execution paths can be optimized out depends on the |
| 1481 | * function argument of instances | 1483 | * function argument of instances. However, if an error occurs, |
| 1484 | * it should be handled by the caller. | ||
| 1482 | */ | 1485 | */ |
| 1483 | return 0; | 1486 | return ret < 0 ? ret : 0; |
| 1484 | } | 1487 | } |
| 1485 | 1488 | ||
| 1486 | /* Search function definition from function name */ | 1489 | /* Search function definition from function name */ |
