Skip to contentSkip to conversation

perf probe: Correct probe syntax on command line help

PATCH In review Masami Hiramatsu 1 participant 4 messages Mar 4, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 perf probe: Correct probe syntax on command line help

Move @SRC right after FUNC in syntax according to syntax change on command line help.

Cc Ingo Molnar <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc K.Prasad <[email protected]>

---

 tools/perf/builtin-probe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/builtin-probe.c +1 -1
index e3dfd0d..c30a335 100644
@@ -177,7 +177,7 @@ static const struct option options[] = {
 #ifdef NO_DWARF_SUPPORT
 		"[EVENT=]FUNC[+OFF|%return] [ARG ...]",
 #else
-		"[EVENT=]FUNC[+OFF|%return|:RL|;PT][@SRC]|SRC:AL|SRC;PT"
+		"[EVENT=]FUNC[@SRC][+OFF|%return|:RL|;PT]|SRC:AL|SRC;PT"
 		" [ARG ...]",
 #endif
 		"probe point definition, where\n"
Signature · 2 lines
Masami Hiramatsu
e-mail: [email protected]
#1 lore raw

PATCH v2 2/2 x86: Issue at least one memory barrier in stop_machine_text_poke().

Fix stop_machine_text_poke() to issue smp_mb() before exiting waiting loop, and use cpu_relax() for waiting.

Changes in v2:
- Don't use ACCESS_ONCE().

---

 arch/x86/kernel/alternative.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/alternative.c +2 -2
index 635e4f4..3a4bf35 100644
@@ -597,8 +597,8 @@ static int __kprobes stop_machine_text_poke(void *data)
 		wrote_text = 1;
 	} else {
 		while (!wrote_text)
-			smp_rmb();
-		sync_core();
+			cpu_relax();
+		smp_mb();	/* Load wrote_text before following execution */
 	}
 
 	flush_icache_range((unsigned long)tpp->addr,
Signature · 2 lines
Masami Hiramatsu
e-mail: [email protected]
#2 lore raw

[tip:perf/pebs] x86: Issue at least one memory barrier in stop_machine_text_poke()

Commit-ID:  e5a11016643d1ab7172193591506d33a844734cc
Gitweb:     http://git.kernel.org/tip/e5a11016643d1ab7172193591506d33a844734cc
Author:     Masami Hiramatsu <[email protected]>
AuthorDate: Wed, 3 Mar 2010 22:38:50 -0500
Committer:  Ingo Molnar <[email protected]>
CommitDate: Thu, 4 Mar 2010 11:39:21 +0100

x86: Issue at least one memory barrier in stop_machine_text_poke()

Fix stop_machine_text_poke() to issue smp_mb() before exiting waiting loop, and use cpu_relax() for waiting.

Changes in v2:
- Don't use ACCESS_ONCE().

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/alternative.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/alternative.c +2 -2
index c41f13c..e0b8770 100644
@@ -595,8 +595,8 @@ static int __kprobes stop_machine_text_poke(void *data)
 		wrote_text = 1;
 	} else {
 		while (!wrote_text)
-			smp_rmb();
-		sync_core();
+			cpu_relax();
+		smp_mb();	/* Load wrote_text before following execution */
 	}
 
 	flush_icache_range((unsigned long)tpp->addr,
#3 lore raw
In reply to Masami Hiramatsu
Commit-ID:  32cb0dd50672056e510ccab442dc9c3a03be649e
Gitweb:     http://git.kernel.org/tip/32cb0dd50672056e510ccab442dc9c3a03be649e
Author:     Masami Hiramatsu <[email protected]>
AuthorDate: Wed, 3 Mar 2010 22:38:43 -0500
Committer:  Ingo Molnar <[email protected]>
CommitDate: Thu, 4 Mar 2010 11:39:21 +0100

perf probe: Correct probe syntax on command line help

Move @SRC right after FUNC in syntax according to syntax change on command line help.

Cc systemtap <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc K.Prasad <[email protected]>

LKML-Reference: <[email protected]>

---
 tools/perf/builtin-probe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/builtin-probe.c +1 -1
index e3dfd0d..c30a335 100644
@@ -177,7 +177,7 @@ static const struct option options[] = {
 #ifdef NO_DWARF_SUPPORT
 		"[EVENT=]FUNC[+OFF|%return] [ARG ...]",
 #else
-		"[EVENT=]FUNC[+OFF|%return|:RL|;PT][@SRC]|SRC:AL|SRC;PT"
+		"[EVENT=]FUNC[@SRC][+OFF|%return|:RL|;PT]|SRC:AL|SRC;PT"
 		" [ARG ...]",
 #endif
 		"probe point definition, where\n"