From: Jeremy Fitzhardinge <jeremy@goop.org>
To: mathieu.desnoyers@polymtl.ca
Cc: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Subject: [PATCH 3/5] x86/paravirt: update tracing for start/end context switch
Date: Thu, 16 Apr 2009 23:39:32 -0700 [thread overview]
Message-ID: <1239950374-1252-4-git-send-email-jeremy@goop.org> (raw)
In-Reply-To: <1239950374-1252-1-git-send-email-jeremy@goop.org>
From: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
lazy_cpu_mode has been replaced with start/end context switch.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.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
next prev parent reply other threads:[~2009-04-17 6:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-17 6:39 [PATCH RFC] WIP pvops trace events Jeremy Fitzhardinge
2009-04-17 6:39 ` [PATCH 1/5] x86/paravirt: split paravirt definitions into paravirt_types.h Jeremy Fitzhardinge
2009-04-17 6:39 ` [PATCH 2/5] x86/pvops: add tracing for all significant pvops entrypoints Jeremy Fitzhardinge
2009-04-17 6:39 ` Jeremy Fitzhardinge [this message]
2009-04-17 6:39 ` [PATCH 4/5] x86/paravirt: add forward-decl for task_struct Jeremy Fitzhardinge
2009-04-17 6:39 ` [PATCH 5/5] x86/pvops: move tracing around to match CREATE_PVOPS_TRACE_POINTS Jeremy Fitzhardinge
2009-04-17 8:43 ` [PATCH RFC] WIP pvops trace events Ingo Molnar
2009-04-17 13:49 ` Jeremy Fitzhardinge
2009-04-17 15:55 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1239950374-1252-4-git-send-email-jeremy@goop.org \
--to=jeremy@goop.org \
--cc=jeremy.fitzhardinge@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®