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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 16 Apr 2009 23:39:32 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	mathieu.desnoyers@...ymtl.ca
Cc:	Steven Rostedt <rostedt@...dmis.org>, Ingo Molnar <mingo@...e.hu>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
Subject: [PATCH 3/5] x86/paravirt: update tracing for start/end context switch

From: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>

lazy_cpu_mode has been replaced with start/end context switch.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
---
 arch/x86/include/asm/paravirt-trace.h |   31 +++++++++++++++++++++----------
 arch/x86/include/asm/paravirt.h       |    2 ++
 2 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/arch/x86/include/asm/paravirt-trace.h b/arch/x86/include/asm/paravirt-trace.h
index 2c72964..00e755a 100644
--- a/arch/x86/include/asm/paravirt-trace.h
+++ b/arch/x86/include/asm/paravirt-trace.h
@@ -12,6 +12,7 @@
 
 struct tss_struct;
 struct thread_struct;
+struct task_struct;
 
 /* width for %0*x */
 #define HEX_FIELD(type)	((int)sizeof(type) * 2)
@@ -1119,18 +1120,28 @@ TRACE_EVENT(pmd_clear,
 
 #endif	/* CONFIG_X86_PAE */
 
-TRACE_EVENT(enter_lazy_cpu,
-	    TP_PROTO(int __dummy),
-	    TP_ARGS(__dummy),
-	    ,
-	    ,
+TRACE_EVENT(start_context_switch,
+	    TP_PROTO(struct task_struct *prev),
+	    TP_ARGS(prev),
+	    TP_STRUCT__entry(
+		    __field(struct task_struct *, prev)
+		    ),
+	    TP_fast_assign(
+		    __entry->prev = prev
+		    ),
+	    TP_printk("prev:%p", __entry->prev)
 	);
 
-TRACE_EVENT(leave_lazy_cpu,
-	    TP_PROTO(int __dummy),
-	    TP_ARGS(__dummy),
-	    ,
-	    ,
+TRACE_EVENT(end_context_switch,
+	    TP_PROTO(struct task_struct *next),
+	    TP_ARGS(next),
+	    TP_STRUCT__entry(
+		    __field(struct task_struct *, next)
+		    ),
+	    TP_fast_assign(
+		    __entry->next = next
+		    ),
+	    TP_printk("next:%p", __entry->next)
 	);
 
 TRACE_EVENT(enter_lazy_mmu,
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index fafb965..07b4e97 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -834,11 +834,13 @@ static inline void pmd_clear(pmd_t *pmdp)
 #define  __HAVE_ARCH_START_CONTEXT_SWITCH
 static inline void arch_start_context_switch(struct task_struct *prev)
 {
+	trace_start_context_switch(prev);
 	PVOP_VCALL1(pv_cpu_ops.start_context_switch, prev);
 }
 
 static inline void arch_end_context_switch(struct task_struct *next)
 {
+	trace_end_context_switch(next);
 	PVOP_VCALL1(pv_cpu_ops.end_context_switch, next);
 }
 
-- 
1.6.0.6

--
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