diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-07-30 08:51:06 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-07-30 08:51:06 -0400 |
commit | f9b9f812235d53f774a083e88a5a23b517a69752 (patch) | |
tree | 3f56a1a1e1e561e25317c7c3ede127d509961ffa | |
parent | 068f1d3f45546f4bb24e9be67231db1be296f0c8 (diff) | |
parent | 8578b891ec38c39abd5d6376afd05fce78e2628c (diff) |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core
Pull perf/core improvements and fixes from Jiri Olsa:
* Fix perf usage string leftover (Jiri Olsa)
* Revert "perf tools: Fix jump label always changing during tracing" (Jiri Olsa)
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | tools/perf/perf.c | 2 | ||||
-rw-r--r-- | tools/perf/util/cloexec.c | 9 |
2 files changed, 3 insertions, 8 deletions
diff --git a/tools/perf/perf.c b/tools/perf/perf.c index eed3fb2a3af0..2282d41879a2 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <pthread.h> | 18 | #include <pthread.h> |
19 | 19 | ||
20 | const char perf_usage_string[] = | 20 | const char perf_usage_string[] = |
21 | "perf [--version] [--debug variable[=VALUE]] [--help] COMMAND [ARGS]"; | 21 | "perf [--version] [--help] [OPTIONS] COMMAND [ARGS]"; |
22 | 22 | ||
23 | const char perf_more_info_string[] = | 23 | const char perf_more_info_string[] = |
24 | "See 'perf help COMMAND' for more information on a specific command."; | 24 | "See 'perf help COMMAND' for more information on a specific command."; |
diff --git a/tools/perf/util/cloexec.c b/tools/perf/util/cloexec.c index 6a37be53a5d2..c5d05ec17220 100644 --- a/tools/perf/util/cloexec.c +++ b/tools/perf/util/cloexec.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <sched.h> | ||
2 | #include "util.h" | 1 | #include "util.h" |
3 | #include "../perf.h" | 2 | #include "../perf.h" |
4 | #include "cloexec.h" | 3 | #include "cloexec.h" |
@@ -15,13 +14,9 @@ static int perf_flag_probe(void) | |||
15 | }; | 14 | }; |
16 | int fd; | 15 | int fd; |
17 | int err; | 16 | int err; |
18 | int cpu = sched_getcpu(); | ||
19 | |||
20 | if (cpu < 0) | ||
21 | cpu = 0; | ||
22 | 17 | ||
23 | /* check cloexec flag */ | 18 | /* check cloexec flag */ |
24 | fd = sys_perf_event_open(&attr, -1, cpu, -1, | 19 | fd = sys_perf_event_open(&attr, 0, -1, -1, |
25 | PERF_FLAG_FD_CLOEXEC); | 20 | PERF_FLAG_FD_CLOEXEC); |
26 | err = errno; | 21 | err = errno; |
27 | 22 | ||
@@ -35,7 +30,7 @@ static int perf_flag_probe(void) | |||
35 | err, strerror(err)); | 30 | err, strerror(err)); |
36 | 31 | ||
37 | /* not supported, confirm error related to PERF_FLAG_FD_CLOEXEC */ | 32 | /* not supported, confirm error related to PERF_FLAG_FD_CLOEXEC */ |
38 | fd = sys_perf_event_open(&attr, -1, cpu, -1, 0); | 33 | fd = sys_perf_event_open(&attr, 0, -1, -1, 0); |
39 | err = errno; | 34 | err = errno; |
40 | 35 | ||
41 | if (WARN_ONCE(fd < 0, | 36 | if (WARN_ONCE(fd < 0, |