Skip to contentSkip to conversation

perf tests: Check proper prev_state size for sched_switch tp

PATCH New Jiri Olsa 2 participants 2 messages Jul 12, 2013 – Jul 19, 2013 perf events

lore
Share & tools
lore

Jiri Olsa

author
#0 lore raw

PATCH 1/1 perf tests: Check proper prev_state size for sched_switch tp

The prev_state is defined as long which is 4 bytes long on 32-bit x86. Changing the check against sizeof(long).

Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
---
 tools/perf/tests/evsel-tp-sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/evsel-tp-sched.c +1 -1
index f79e7d0..9b98c15 100644
@@ -49,7 +49,7 @@ int test__perf_evsel__tp_sched_test(void)
 	if (perf_evsel__test_field(evsel, "prev_prio", 4, true))
 		ret = -1;
 
-	if (perf_evsel__test_field(evsel, "prev_state", 8, true))
+	if (perf_evsel__test_field(evsel, "prev_state", sizeof(long), true))
 		ret = -1;
 
 	if (perf_evsel__test_field(evsel, "next_comm", 16, true))
Signature · 1 line
1.7.11.7
#1 lore raw
perf tests: Check proper prev_state size for sched_switch tp
Commit-ID:  8d76e1852794fac6ff0b538120d9856b0b07ef8a
Gitweb:     http://git.kernel.org/tip/8d76e1852794fac6ff0b538120d9856b0b07ef8a
Author:     Jiri Olsa <[email protected]>
AuthorDate: Fri, 12 Jul 2013 16:29:06 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 17 Jul 2013 12:34:53 -0300

perf tests: Check proper prev_state size for sched_switch tp

The prev_state is defined as long which is 4 bytes long on 32-bit x86. Changing the check against sizeof(long).

---
 tools/perf/tests/evsel-tp-sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/evsel-tp-sched.c +1 -1
index f79e7d0..9b98c15 100644
@@ -49,7 +49,7 @@ int test__perf_evsel__tp_sched_test(void)
 	if (perf_evsel__test_field(evsel, "prev_prio", 4, true))
 		ret = -1;
 
-	if (perf_evsel__test_field(evsel, "prev_state", 8, true))
+	if (perf_evsel__test_field(evsel, "prev_state", sizeof(long), true))
 		ret = -1;
 
 	if (perf_evsel__test_field(evsel, "next_comm", 16, true))