From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Xen Devel <Xen-devel@lists.xensource.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Subject: Re: [PATCH 09/15] xen/trace: add tlb flush tracepoints
Date: Tue, 21 Jun 2011 10:07:05 -0400 [thread overview]
Message-ID: <20110621140705.GD28229@dumpdata.com> (raw)
In-Reply-To: <4db3e32a6b21efdb4d82646816ddb1bb82ff2259.1308607697.git.jeremy.fitzhardinge@citrix.com>
On Mon, Jun 20, 2011 at 03:15:05PM -0700, Jeremy Fitzhardinge wrote:
> From: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
>
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
> ---
> arch/x86/xen/mmu.c | 8 +++++++
> include/trace/events/xen.h | 48 ++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 56 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
> index 8aaa398..ad8a226 100644
> --- a/arch/x86/xen/mmu.c
> +++ b/arch/x86/xen/mmu.c
> @@ -1221,6 +1221,8 @@ static void xen_flush_tlb(void)
> struct mmuext_op *op;
> struct multicall_space mcs;
>
> + trace_xen_mmu_flush_tlb(0);
> +
> preempt_disable();
>
> mcs = xen_mc_entry(sizeof(*op));
> @@ -1239,6 +1241,8 @@ static void xen_flush_tlb_single(unsigned long addr)
> struct mmuext_op *op;
> struct multicall_space mcs;
>
> + trace_xen_mmu_flush_tlb_single(addr);
> +
> preempt_disable();
>
> mcs = xen_mc_entry(sizeof(*op));
> @@ -1261,6 +1265,8 @@ static void xen_flush_tlb_others(const struct cpumask *cpus,
> } *args;
> struct multicall_space mcs;
>
> + trace_xen_mmu_flush_tlb_others(cpus, mm, va);
> +
> if (cpumask_empty(cpus))
> return; /* nothing to do */
>
> @@ -1300,6 +1306,8 @@ static void __xen_write_cr3(bool kernel, unsigned long cr3)
> struct multicall_space mcs;
> unsigned long mfn;
>
> + trace_xen_mmu_write_cr3(kernel, cr3);
> +
> if (cr3)
> mfn = pfn_to_mfn(PFN_DOWN(cr3));
> else
> diff --git a/include/trace/events/xen.h b/include/trace/events/xen.h
> index b1f73c4..7d88f7d 100644
> --- a/include/trace/events/xen.h
> +++ b/include/trace/events/xen.h
> @@ -405,6 +405,54 @@ TRACE_EVENT(xen_mmu_pgd_unpin,
> TP_printk("mm %p pgd %p", __entry->mm, __entry->pgd)
> );
>
> +TRACE_EVENT(xen_mmu_flush_tlb,
> + TP_PROTO(int x),
> + TP_ARGS(x),
> + TP_STRUCT__entry(__array(char, x, 0)),
> + TP_fast_assign((void)x),
> + TP_printk("%s", "")
Um, why not just "" without the %s?
> + );
> +
> +TRACE_EVENT(xen_mmu_flush_tlb_single,
> + TP_PROTO(unsigned long addr),
> + TP_ARGS(addr),
> + TP_STRUCT__entry(
> + __field(unsigned long, addr)
> + ),
> + TP_fast_assign(__entry->addr = addr),
> + TP_printk("addr %lx", __entry->addr)
> + );
> +
> +TRACE_EVENT(xen_mmu_flush_tlb_others,
> + TP_PROTO(const struct cpumask *cpus, struct mm_struct *mm,
> + unsigned long addr),
> + TP_ARGS(cpus, mm, addr),
> + TP_STRUCT__entry(
> + __field(unsigned, ncpus)
> + __field(struct mm_struct *, mm)
> + __field(unsigned long, addr)
> + ),
> + TP_fast_assign(__entry->ncpus = cpumask_weight(cpus);
> + __entry->mm = mm;
> + __entry->addr = addr),
> + TP_printk("ncpus %d mm %p addr %lx",
> + __entry->ncpus, __entry->mm, __entry->addr)
> + );
> +
> +TRACE_EVENT(xen_mmu_write_cr3,
> + TP_PROTO(bool kernel, unsigned long cr3),
> + TP_ARGS(kernel, cr3),
> + TP_STRUCT__entry(
> + __field(bool, kernel)
> + __field(unsigned long, cr3)
> + ),
> + TP_fast_assign(__entry->kernel = kernel;
> + __entry->cr3 = cr3),
> + TP_printk("%s cr3 %lx",
> + __entry->kernel ? "kernel" : "user", __entry->cr3)
> + );
> +
> +
> /* CPU */
> TRACE_EVENT(xen_cpu_write_ldt_entry,
> TP_PROTO(struct desc_struct *dt, int entrynum, u64 desc),
> --
> 1.7.5.4
next prev parent reply other threads:[~2011-06-21 14:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-20 22:14 [PATCH 00/15] xen: use tracing to replace ad-hoc debug/stats stuff Jeremy Fitzhardinge
2011-06-20 22:14 ` [PATCH 01/15] trace/xen: add skeleton for Xen trace events Jeremy Fitzhardinge
2011-06-20 22:14 ` [PATCH 02/15] xen/multicalls: remove debugfs stats Jeremy Fitzhardinge
2011-06-20 22:14 ` [PATCH 03/15] xen/trace: set up tracepoint skeleton Jeremy Fitzhardinge
2011-06-20 22:15 ` [PATCH 04/15] xen/trace: add multicall tracing Jeremy Fitzhardinge
2011-06-21 13:52 ` Konrad Rzeszutek Wilk
2011-06-21 17:11 ` Jeremy Fitzhardinge
2011-06-21 17:21 ` Konrad Rzeszutek Wilk
2011-06-20 22:15 ` [PATCH 05/15] xen/trace: add mmu tracepoints Jeremy Fitzhardinge
2011-06-21 0:27 ` Steven Rostedt
2011-06-20 22:15 ` [PATCH 06/15] xen/trace: add ptpage alloc/release tracepoints Jeremy Fitzhardinge
2011-06-21 13:55 ` Konrad Rzeszutek Wilk
2011-06-20 22:15 ` [PATCH 07/15] xen/trace: add xen_pgd_(un)pin tracepoints Jeremy Fitzhardinge
2011-06-21 0:28 ` Steven Rostedt
2011-06-21 17:30 ` Jeremy Fitzhardinge
2011-06-20 22:15 ` [PATCH 08/15] xen/trace: add segment desc tracing Jeremy Fitzhardinge
2011-06-21 14:03 ` Konrad Rzeszutek Wilk
2011-06-21 17:14 ` Jeremy Fitzhardinge
2011-06-20 22:15 ` [PATCH 09/15] xen/trace: add tlb flush tracepoints Jeremy Fitzhardinge
2011-06-21 14:07 ` Konrad Rzeszutek Wilk [this message]
2011-06-23 19:52 ` Jeremy Fitzhardinge
2011-06-23 20:23 ` Steven Rostedt
2011-06-23 22:58 ` Jeremy Fitzhardinge
2011-06-24 2:00 ` Steven Rostedt
2011-06-20 22:15 ` [PATCH 10/15] xen/mmu: use extend_args for more mmuext updates Jeremy Fitzhardinge
2011-06-20 22:15 ` [PATCH 11/15] xen/mmu: tune pgtable alloc/release Jeremy Fitzhardinge
2011-06-20 22:15 ` [PATCH 12/15] xen/multicalls: disable MC_DEBUG Jeremy Fitzhardinge
2011-06-20 22:15 ` [PATCH 13/15] xen/multicalls: add unlikely around slowpath in __xen_mc_entry() Jeremy Fitzhardinge
2011-06-20 22:15 ` [PATCH 14/15] xen/multicall: special-case singleton hypercalls Jeremy Fitzhardinge
2011-06-20 22:15 ` [PATCH 15/15] xen/multicall: move *idx fields to start of mc_buffer Jeremy Fitzhardinge
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=20110621140705.GD28229@dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=Xen-devel@lists.xensource.com \
--cc=jeremy.fitzhardinge@citrix.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--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