diff options
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/tests/code-reading.c | 1 | ||||
-rw-r--r-- | tools/perf/util/probe-finder.c | 15 |
8 files changed, 51 insertions, 14 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/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 */ |