Skip to contentSkip to conversation

perf/core improvements and fixes

GIT PULL In review Jiri Olsa 4 participants 6 messages Jul 28, 2014 – Jul 30, 2014 perf events

lore
Share & tools
lore

Jiri Olsa

author reviewer
#0 lore raw

hi Ingo,
please consider pulling

thanks,
jirka

The following changes since commit 068f1d3f45546f4bb24e9be67231db1be296f0c8:

Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-07-28 10:09:03 +0200)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo

for you to fetch changes up to 8578b891ec38c39abd5d6376afd05fce78e2628c:

Revert "perf tools: Fix jump label always changing during tracing" (2014-07-28 16:39:18 +0200)

----------------------------------------------------------------
perf/core improvements and fixes:

. Fix perf usage string leftover (Jiri Olsa)

. Revert "perf tools: Fix jump label always changing during tracing" (Jiri Olsa)

----------------------------------------------------------------
Jiri Olsa (2):
perf tools: Fix perf usage string leftover
Revert "perf tools: Fix jump label always changing during tracing"

 tools/perf/perf.c         | 2 +-
 tools/perf/util/cloexec.c | 9 ++-------
 2 files changed, 3 insertions(+), 8 deletions(-)
author reviewer
#1 lore raw

PATCH 1/2 perf tools: Fix perf usage string leftover

Fixing perf usage string leftover pointed out by Namhyung.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 tools/perf/perf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/perf.c +1 -1
index eed3fb2a3af0..2282d41879a2 100644
@@ -18,7 +18,7 @@
 #include <pthread.h>
 
 const char perf_usage_string[] =
-	"perf [--version] [--debug variable[=VALUE]] [--help] COMMAND [ARGS]";
+	"perf [--version] [--help] [OPTIONS] COMMAND [ARGS]";
 
 const char perf_more_info_string[] =
 	"See 'perf help COMMAND' for more information on a specific command.";
Signature · 1 line
1.8.3.1
author reviewer
#2 lore raw

PATCH 2/2 Revert "perf tools: Fix jump label always changing during tracing"

In reply to Jiri Olsa

This reverts commit deaff8b659cf4d34181c087b8cdf74f1eb17b02b.

This commit makes CLOEXEC feature undetected for normal users, because per-cpu events are priviledged.

Cc Adrian Hunter <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
---
 tools/perf/util/cloexec.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
tools/perf/util/cloexec.c +2 -7
index 6a37be53a5d2..c5d05ec17220 100644
@@ -1,4 +1,3 @@
-#include <sched.h>
 #include "util.h"
 #include "../perf.h"
 #include "cloexec.h"
@@ -15,13 +14,9 @@ static int perf_flag_probe(void)
 	};
 	int fd;
 	int err;
-	int cpu = sched_getcpu();
-
-	if (cpu < 0)
-		cpu = 0;
 
 	/* check cloexec flag */
-	fd = sys_perf_event_open(&attr, -1, cpu, -1,
+	fd = sys_perf_event_open(&attr, 0, -1, -1,
 				 PERF_FLAG_FD_CLOEXEC);
 	err = errno;
 
@@ -35,7 +30,7 @@ static int perf_flag_probe(void)
 		  err, strerror(err));
 
 	/* not supported, confirm error related to PERF_FLAG_FD_CLOEXEC */
-	fd = sys_perf_event_open(&attr, -1, cpu, -1, 0);
+	fd = sys_perf_event_open(&attr, 0, -1, -1, 0);
 	err = errno;
 
 	if (WARN_ONCE(fd < 0,
Signature · 1 line
1.8.3.1
maintainer
#3 lore raw

Re: [PATCH 2/2] Revert "perf tools: Fix jump label always changing during tracing"

Quoted 6 lines · Jiri Olsa

This reverts commit deaff8b659cf4d34181c087b8cdf74f1eb17b02b.

This commit makes CLOEXEC feature undetected for normal users, because per-cpu events are priviledged.

Thanks Jiri!

#4 lore raw

Re: [PATCH 2/2] Revert "perf tools: Fix jump label always changing during tracing"

Em Mon, Jul 28, 2014 at 05:04:33PM +0200, Peter Zijlstra escreveu:

Quoted 9 lines · Jiri Olsa
Quoted 6 lines

This reverts commit deaff8b659cf4d34181c087b8cdf74f1eb17b02b.

This commit makes CLOEXEC feature undetected for normal users, because per-cpu events are priviledged.

Thanks Jiri!

Thanks++

:-)

- Arnaldo

#5 lore raw
In reply to Jiri Olsa
Quoted 29 lines · Jiri Olsa

hi Ingo,
please consider pulling

thanks,
jirka

The following changes since commit 068f1d3f45546f4bb24e9be67231db1be296f0c8:

Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-07-28 10:09:03 +0200)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo

for you to fetch changes up to 8578b891ec38c39abd5d6376afd05fce78e2628c:

Revert "perf tools: Fix jump label always changing during tracing" (2014-07-28 16:39:18 +0200)

----------------------------------------------------------------
perf/core improvements and fixes:

. Fix perf usage string leftover (Jiri Olsa)

. Revert "perf tools: Fix jump label always changing during tracing" (Jiri Olsa)

Quoted 8 lines

----------------------------------------------------------------
Jiri Olsa (2):
perf tools: Fix perf usage string leftover
Revert "perf tools: Fix jump label always changing during tracing"

 tools/perf/perf.c         | 2 +-
 tools/perf/util/cloexec.c | 9 ++-------
 2 files changed, 3 insertions(+), 8 deletions(-)

Pulled, thanks a lot Jiri!

Ingo