linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Anton Blanchard <anton@samba.org>
Cc: a.p.zijlstra@chello.nl, linux-kernel@vger.kernel.org,
	linuxppc-dev@ozlabs.org, paulus@samba.org, mingo@elte.hu
Subject: Re: [PATCH 3/3] powerpc perf_event: Add alignment-faults and emulation-faults software events
Date: Mon, 19 Oct 2009 10:50:05 +1100	[thread overview]
Message-ID: <1255909805.4192.5.camel@concordia> (raw)
In-Reply-To: <20091018111300.GM4808@kryten>

[-- Attachment #1: Type: text/plain, Size: 1449 bytes --]

On Sun, 2009-10-18 at 22:13 +1100, Anton Blanchard wrote:
> Hook up the alignment-faults and emulation-faults events for powerpc.
> 
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
> 
> Index: linux.trees.git/arch/powerpc/include/asm/emulated_ops.h
> ===================================================================
> --- linux.trees.git.orig/arch/powerpc/include/asm/emulated_ops.h	2009-09-22 13:45:07.000000000 +1000
> +++ linux.trees.git/arch/powerpc/include/asm/emulated_ops.h	2009-09-22 13:45:27.000000000 +1000
> @@ -19,6 +19,7 @@
>  #define _ASM_POWERPC_EMULATED_OPS_H
>  
>  #include <asm/atomic.h>
> +#include <linux/perf_event.h>
>  
> 
>  #ifdef CONFIG_PPC_EMULATED_STATS
> @@ -71,7 +72,18 @@ extern void ppc_warn_emulated_print(cons
>  
>  #endif /* !CONFIG_PPC_EMULATED_STATS */
>  
> -#define PPC_WARN_EMULATED(type, regs)	__PPC_WARN_EMULATED(type)
> -#define PPC_WARN_ALIGNMENT(type, regs)	__PPC_WARN_EMULATED(type)
> +#define PPC_WARN_EMULATED(type, regs)					\
> +	do {								\
> +		perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS,		\
> +			1, 0, regs, 0);					\
> +		__PPC_WARN_EMULATED(type);				\
> +	} while (0)
> +
> +#define PPC_WARN_ALIGNMENT(type, regs)					\
> +	do {								\
> +		perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS,		\
> +			1, 0, regs, regs->dar);				\
> +		__PPC_WARN_EMULATED(type);				\
> +	} while (0)

Does that work with perfxxx configured off?

cheers

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2009-10-18 23:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-18 11:09 [PATCH 1/3] perf_event: Add alignment-faults and emulation-faults software events Anton Blanchard
2009-10-18 11:11 ` [PATCH 2/3] powerpc: Create PPC_WARN_ALIGNMENT to match PPC_WARN_EMULATED Anton Blanchard
2009-10-18 11:13   ` [PATCH 3/3] powerpc perf_event: Add alignment-faults and emulation-faults software events Anton Blanchard
2009-10-18 23:50     ` Michael Ellerman [this message]
2009-10-19  0:42       ` Anton Blanchard
2009-10-19  7:25     ` Ingo Molnar
2009-10-18 12:37   ` [PATCH 2/3] powerpc: Create PPC_WARN_ALIGNMENT to match PPC_WARN_EMULATED Stephen Rothwell
2009-10-28  4:46     ` Anton Blanchard

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=1255909805.4192.5.camel@concordia \
    --to=michael@ellerman.id.au \
    --cc=a.p.zijlstra@chello.nl \
    --cc=anton@samba.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).