Skip to contentSkip to conversation

perf tools: Remove cwd from perf_session struct

PATCH New Jiri Olsa 2 participants 6 messages Jun 7, 2013 – Jul 19, 2013 perf events

lore
Share & tools
lore

Jiri Olsa

author
#0 lore raw

PATCH 1/3 perf tools: Remove cwd from perf_session struct

Removing 'cwd' from perf_session struct as it's no longer needed.

Cc Corey Ashford <[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]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Andi Kleen <[email protected]>
Cc David Ahern <[email protected]>
---
 tools/perf/util/session.h | 1 -
 1 file changed, 1 deletion(-)
tools/perf/util/session.h +0 -1
index f3b235e..ad8d3d4 100644
@@ -37,7 +37,6 @@ struct perf_session {
 	int			fd;
 	bool			fd_pipe;
 	bool			repipe;
-	char			*cwd;
 	struct ordered_samples	ordered_samples;
 	char			filename[1];
 };
Signature · 1 line
1.7.11.7
author
#1 lore raw

PATCH 2/3 perf tests: Omit end of the symbol check failure for test 1

Omitting end of the function check failure for test 1, since there's no way to get exact symbol end via kallsyms.

Leaving the debug message.

Cc Corey Ashford <[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]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Andi Kleen <[email protected]>
Cc David Ahern <[email protected]>
---
 tools/perf/tests/vmlinux-kallsyms.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
tools/perf/tests/vmlinux-kallsyms.c +11 -4
index 7b4c4d2..add1539 100644
@@ -139,11 +139,18 @@ next_pair:
 				 * _really_ have a problem.
 				 */
 				s64 skew = sym->end - pair->end;
-				if (llabs(skew) < page_size)
-					continue;
+				if (llabs(skew) >= page_size)
+					pr_debug("%#" PRIx64 ": diff end addr for %s v: %#" PRIx64 " k: %#" PRIx64 "\n",
+						 sym->start, sym->name, sym->end, pair->end);
+
+				/*
+				 * Do not count this as a failure, because we
+				 * could really find a case where it's not
+				 * possible to get proper function end from
+				 * kallsyms.
+				 */
+				continue;
 
-				pr_debug("%#" PRIx64 ": diff end addr for %s v: %#" PRIx64 " k: %#" PRIx64 "\n",
-					 sym->start, sym->name, sym->end, pair->end);
 			} else {
 				struct rb_node *nnd;
 detour:
Signature · 1 line
1.7.11.7
#2 lore raw

[tip:perf/core] perf tests: Omit end of the symbol check failure for test 1

perf tests: Omit end of the symbol check failure for test 1
Commit-ID:  5888a8c26e5f8e76334d579637f9ed55036cec5a
Gitweb:     http://git.kernel.org/tip/5888a8c26e5f8e76334d579637f9ed55036cec5a
Author:     Jiri Olsa <[email protected]>
AuthorDate: Fri, 7 Jun 2013 15:37:02 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 12 Jul 2013 13:45:50 -0300

perf tests: Omit end of the symbol check failure for test 1

Omitting end of the function check failure for test 1, since there's no way to get exact symbol end via kallsyms.

Leaving the debug message.

Cc Andi Kleen <[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/tests/vmlinux-kallsyms.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
tools/perf/tests/vmlinux-kallsyms.c +11 -4
index 7b4c4d2..add1539 100644
@@ -139,11 +139,18 @@ next_pair:
 				 * _really_ have a problem.
 				 */
 				s64 skew = sym->end - pair->end;
-				if (llabs(skew) < page_size)
-					continue;
+				if (llabs(skew) >= page_size)
+					pr_debug("%#" PRIx64 ": diff end addr for %s v: %#" PRIx64 " k: %#" PRIx64 "\n",
+						 sym->start, sym->name, sym->end, pair->end);
+
+				/*
+				 * Do not count this as a failure, because we
+				 * could really find a case where it's not
+				 * possible to get proper function end from
+				 * kallsyms.
+				 */
+				continue;
 
-				pr_debug("%#" PRIx64 ": diff end addr for %s v: %#" PRIx64 " k: %#" PRIx64 "\n",
-					 sym->start, sym->name, sym->end, pair->end);
 			} else {
 				struct rb_node *nnd;
 detour:
author
#3 lore raw

PATCH 3/3 perf tests: Make TEST_ASSERT_VAL global

In reply to Jiri Olsa

Making TEST_ASSERT_VAL global as it's used in multiple objects.

Cc Corey Ashford <[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]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Andi Kleen <[email protected]>
Cc David Ahern <[email protected]>
---
 tools/perf/tests/dso-data.c     | 8 --------
 tools/perf/tests/parse-events.c | 8 --------
 tools/perf/tests/tests.h        | 8 ++++++++
 3 files changed, 8 insertions(+), 16 deletions(-)
tools/perf/tests/dso-data.c +0 -8
index 5eaffa2..dffe055 100644
@@ -10,14 +10,6 @@
 #include "symbol.h"
 #include "tests.h"
 
-#define TEST_ASSERT_VAL(text, cond) \
-do { \
-	if (!(cond)) { \
-		pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
-		return -1; \
-	} \
-} while (0)
-
 static char *test_file(int size)
 {
 	static char buf_templ[] = "/tmp/test-XXXXXX";
tools/perf/tests/parse-events.c +0 -8
index 0275bab..ad950f5 100644
@@ -7,14 +7,6 @@
 #include "tests.h"
 #include <linux/hw_breakpoint.h>
 
-#define TEST_ASSERT_VAL(text, cond) \
-do { \
-	if (!(cond)) { \
-		pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
-		return -1; \
-	} \
-} while (0)
-
 #define PERF_TP_SAMPLE_TYPE (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME | \
 			     PERF_SAMPLE_CPU | PERF_SAMPLE_PERIOD)
 
tools/perf/tests/tests.h +8 -0
index dd7feae..07a92f9 100644
@@ -1,6 +1,14 @@
 #ifndef TESTS_H
 #define TESTS_H
 
+#define TEST_ASSERT_VAL(text, cond)					 \
+do {									 \
+	if (!(cond)) {							 \
+		pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
+		return -1;						 \
+	}								 \
+} while (0)
+
 enum {
 	TEST_OK   =  0,
 	TEST_FAIL = -1,
Signature · 1 line
1.7.11.7
#4 lore raw

[tip:perf/core] perf tests: Make TEST_ASSERT_VAL global

perf tests: Make TEST_ASSERT_VAL global
Commit-ID:  450ac18d8f8076f0c522af1afb8519614a3b32f5
Gitweb:     http://git.kernel.org/tip/450ac18d8f8076f0c522af1afb8519614a3b32f5
Author:     Jiri Olsa <[email protected]>
AuthorDate: Fri, 7 Jun 2013 15:37:03 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 12 Jul 2013 13:45:52 -0300

perf tests: Make TEST_ASSERT_VAL global

Making TEST_ASSERT_VAL global as it's used in multiple objects.

Cc Andi Kleen <[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/tests/dso-data.c     | 8 --------
 tools/perf/tests/parse-events.c | 8 --------
 tools/perf/tests/tests.h        | 8 ++++++++
 3 files changed, 8 insertions(+), 16 deletions(-)
tools/perf/tests/dso-data.c +0 -8
index 5eaffa2..dffe055 100644
@@ -10,14 +10,6 @@
 #include "symbol.h"
 #include "tests.h"
 
-#define TEST_ASSERT_VAL(text, cond) \
-do { \
-	if (!(cond)) { \
-		pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
-		return -1; \
-	} \
-} while (0)
-
 static char *test_file(int size)
 {
 	static char buf_templ[] = "/tmp/test-XXXXXX";
tools/perf/tests/parse-events.c +0 -8
index 0275bab..ad950f5 100644
@@ -7,14 +7,6 @@
 #include "tests.h"
 #include <linux/hw_breakpoint.h>
 
-#define TEST_ASSERT_VAL(text, cond) \
-do { \
-	if (!(cond)) { \
-		pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
-		return -1; \
-	} \
-} while (0)
-
 #define PERF_TP_SAMPLE_TYPE (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME | \
 			     PERF_SAMPLE_CPU | PERF_SAMPLE_PERIOD)
 
tools/perf/tests/tests.h +8 -0
index dd7feae..07a92f9 100644
@@ -1,6 +1,14 @@
 #ifndef TESTS_H
 #define TESTS_H
 
+#define TEST_ASSERT_VAL(text, cond)					 \
+do {									 \
+	if (!(cond)) {							 \
+		pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
+		return -1;						 \
+	}								 \
+} while (0)
+
 enum {
 	TEST_OK   =  0,
 	TEST_FAIL = -1,
#5 lore raw
In reply to Jiri Olsa
perf tools: Remove cwd from perf_session struct
Commit-ID:  eb4fe9cbb1599a673bde0d6dad50e609404275c7
Gitweb:     http://git.kernel.org/tip/eb4fe9cbb1599a673bde0d6dad50e609404275c7
Author:     Jiri Olsa <[email protected]>
AuthorDate: Fri, 7 Jun 2013 15:37:01 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 12 Jul 2013 13:45:48 -0300

perf tools: Remove cwd from perf_session struct

Removing 'cwd' from perf_session struct as it's no longer needed.

Cc Andi Kleen <[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/util/session.h | 1 -
 1 file changed, 1 deletion(-)
tools/perf/util/session.h +0 -1
index f3b235e..ad8d3d4 100644
@@ -37,7 +37,6 @@ struct perf_session {
 	int			fd;
 	bool			fd_pipe;
 	bool			repipe;
-	char			*cwd;
 	struct ordered_samples	ordered_samples;
 	char			filename[1];
 };