aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-01-22 05:08:52 -0500
committerIngo Molnar <mingo@elte.hu>2011-01-22 05:08:52 -0500
commit01bb2dc4e47639c8e7eddb1718720a051bcdc955 (patch)
tree8ae801b13346c32fbca5555862411c74be902266 /tools
parent806839b22cbda90176d7f8d421889bddd7826e93 (diff)
parentffb5e0fb44d0829021a51f972df90166bc9b700e (diff)
Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/urgent
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-test.c13
-rw-r--r--tools/perf/util/symbol.c7
2 files changed, 16 insertions, 4 deletions
diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c
index ed5696198d3d..02958d6a807f 100644
--- a/tools/perf/builtin-test.c
+++ b/tools/perf/builtin-test.c
@@ -380,13 +380,18 @@ static int test__open_syscall_event_on_all_cpus(void)
380 for (cpu = 0; cpu < cpus->nr; ++cpu) { 380 for (cpu = 0; cpu < cpus->nr; ++cpu) {
381 unsigned int ncalls = nr_open_calls + cpu; 381 unsigned int ncalls = nr_open_calls + cpu;
382 382
383 CPU_SET(cpu, cpu_set); 383 CPU_SET_S(cpus->map[cpu], cpu_set_size, cpu_set);
384 sched_setaffinity(0, cpu_set_size, cpu_set); 384 if (sched_setaffinity(0, cpu_set_size, cpu_set) < 0) {
385 pr_debug("sched_setaffinity() failed on CPU %d: %s ",
386 cpus->map[cpu],
387 strerror(errno));
388 goto out_close_fd;
389 }
385 for (i = 0; i < ncalls; ++i) { 390 for (i = 0; i < ncalls; ++i) {
386 fd = open("/etc/passwd", O_RDONLY); 391 fd = open("/etc/passwd", O_RDONLY);
387 close(fd); 392 close(fd);
388 } 393 }
389 CPU_CLR(cpu, cpu_set); 394 CPU_CLR_S(cpus->map[cpu], cpu_set_size, cpu_set);
390 } 395 }
391 396
392 /* 397 /*
@@ -410,7 +415,7 @@ static int test__open_syscall_event_on_all_cpus(void)
410 expected = nr_open_calls + cpu; 415 expected = nr_open_calls + cpu;
411 if (evsel->counts->cpu[cpu].val != expected) { 416 if (evsel->counts->cpu[cpu].val != expected) {
412 pr_debug("perf_evsel__read_on_cpu: expected to intercept %d calls on cpu %d, got %Ld\n", 417 pr_debug("perf_evsel__read_on_cpu: expected to intercept %d calls on cpu %d, got %Ld\n",
413 expected, cpu, evsel->counts->cpu[cpu].val); 418 expected, cpus->map[cpu], evsel->counts->cpu[cpu].val);
414 goto out_close_fd; 419 goto out_close_fd;
415 } 420 }
416 } 421 }
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 15ccfba8cdf8..e32478effed8 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1161,6 +1161,13 @@ static int dso__load_sym(struct dso *self, struct map *map, const char *name,
1161 1161
1162 section_name = elf_sec__name(&shdr, secstrs); 1162 section_name = elf_sec__name(&shdr, secstrs);
1163 1163
1164 /* On ARM, symbols for thumb functions have 1 added to
1165 * the symbol address as a flag - remove it */
1166 if ((ehdr.e_machine == EM_ARM) &&
1167 (map->type == MAP__FUNCTION) &&
1168 (sym.st_value & 1))
1169 --sym.st_value;
1170
1164 if (self->kernel != DSO_TYPE_USER || kmodule) { 1171 if (self->kernel != DSO_TYPE_USER || kmodule) {
1165 char dso_name[PATH_MAX]; 1172 char dso_name[PATH_MAX];
1166 1173