lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 05 May 2009 16:54:52 +0800
From:	Xiao Guangrong <xiaoguangrong@...fujitsu.com>
To:	mingo@...e.hu
CC:	linux-kernel@...r.kernel.org,
	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
	fweisbec@...il.com, rostedt@...dmis.org,
	Li Zefan <lizf@...fujitsu.com>, zhaolei@...fujitsu.com,
	laijs@...fujitsu.com
Subject: [PATCH v2] tracepoint: trace_sched_migrate_task(): remove parameter

From: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>

This patch is modified from Mathieu Desnoyers' patch. The original patch
can be found here: 
	http://marc.info/?l=linux-kernel&m=123791201716239&w=2

The orig_cpu parameter in trace_sched_migrate_task() is not necessary, 
it can be got by using task_cpu(p) in the probe. 

Changelog for v1 -> v2: 
Rebase the patch against latest tip tree. 

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Signed-off-by: Xiao Guangrong <xiaoguangrong@...fujitsu.com>

---
 include/trace/events/sched.h |    6 +++---
 kernel/sched.c               |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index ffa1cab..dd4033c 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -180,9 +180,9 @@ TRACE_EVENT(sched_switch,
  */
 TRACE_EVENT(sched_migrate_task,
 
-	TP_PROTO(struct task_struct *p, int orig_cpu, int dest_cpu),
+	TP_PROTO(struct task_struct *p, int dest_cpu),
 
-	TP_ARGS(p, orig_cpu, dest_cpu),
+	TP_ARGS(p, dest_cpu),
 
 	TP_STRUCT__entry(
 		__array(	char,	comm,	TASK_COMM_LEN	)
@@ -196,7 +196,7 @@ TRACE_EVENT(sched_migrate_task,
 		memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
 		__entry->pid		= p->pid;
 		__entry->prio		= p->prio;
-		__entry->orig_cpu	= orig_cpu;
+		__entry->orig_cpu	= task_cpu(p);
 		__entry->dest_cpu	= dest_cpu;
 	),
 
diff --git a/kernel/sched.c b/kernel/sched.c
index 57125f8..1677f93 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1956,7 +1956,7 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
 
 	clock_offset = old_rq->clock - new_rq->clock;
 
-	trace_sched_migrate_task(p, task_cpu(p), new_cpu);
+	trace_sched_migrate_task(p, new_cpu);
 
 #ifdef CONFIG_SCHEDSTATS
 	if (p->se.wait_start)
-- 
1.6.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ