mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: David Howells <dhowells@redhat.com>
Cc: torvalds@osdl.org, akpm@linux-foundation.org, paulus@samba.org,
	arnd@arndb.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] FRV: Add basic performance counter support
Date: Wed, 1 Jul 2009 23:10:17 +0200	[thread overview]
Message-ID: <20090701211017.GB631@elte.hu> (raw)
In-Reply-To: <20090701164705.29780.60902.stgit@warthog.procyon.org.uk>


* David Howells <dhowells@redhat.com> wrote:

> Add basic performance counter support to the FRV arch.
> 

that was fast :)

Looks good. There's two areas where we can improve the core 
perfcounters code:

> Signed-off-by: David Howells <dhowells@redhat.com>
> ---
> 
>  arch/frv/Kconfig                    |    1 +
>  arch/frv/include/asm/perf_counter.h |   17 +++++++++++++++++
>  arch/frv/lib/Makefile               |    2 +-
>  arch/frv/lib/perf_counter.c         |   19 +++++++++++++++++++
>  4 files changed, 38 insertions(+), 1 deletions(-)
>  create mode 100644 arch/frv/include/asm/perf_counter.h
>  create mode 100644 arch/frv/lib/perf_counter.c
> 
> 
> diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
> index 8a5bd7a..b86e19c 100644
> --- a/arch/frv/Kconfig
> +++ b/arch/frv/Kconfig
> @@ -7,6 +7,7 @@ config FRV
>  	default y
>  	select HAVE_IDE
>  	select HAVE_ARCH_TRACEHOOK
> +	select HAVE_PERF_COUNTERS
>  
>  config ZONE_DMA
>  	bool
> diff --git a/arch/frv/include/asm/perf_counter.h b/arch/frv/include/asm/perf_counter.h
> new file mode 100644
> index 0000000..ccf726e
> --- /dev/null
> +++ b/arch/frv/include/asm/perf_counter.h
> @@ -0,0 +1,17 @@
> +/* FRV performance counter support
> + *
> + * Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
> + * Written by David Howells (dhowells@redhat.com)
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public Licence
> + * as published by the Free Software Foundation; either version
> + * 2 of the Licence, or (at your option) any later version.
> + */
> +
> +#ifndef _ASM_PERF_COUNTER_H
> +#define _ASM_PERF_COUNTER_H
> +
> +#define PERF_COUNTER_INDEX_OFFSET	0

We shouldnt require this of architectures that dont offer hw 
perfcounters yet.


> +
> +#endif /* _ASM_PERF_COUNTER_H */
> diff --git a/arch/frv/lib/Makefile b/arch/frv/lib/Makefile
> index 4ff2fb1..0a37721 100644
> --- a/arch/frv/lib/Makefile
> +++ b/arch/frv/lib/Makefile
> @@ -5,4 +5,4 @@
>  lib-y := \
>  	__ashldi3.o __lshrdi3.o __muldi3.o __ashrdi3.o __negdi2.o __ucmpdi2.o \
>  	checksum.o memcpy.o memset.o atomic-ops.o atomic64-ops.o \
> -	outsl_ns.o outsl_sw.o insl_ns.o insl_sw.o cache.o
> +	outsl_ns.o outsl_sw.o insl_ns.o insl_sw.o cache.o perf_counter.o
> diff --git a/arch/frv/lib/perf_counter.c b/arch/frv/lib/perf_counter.c
> new file mode 100644
> index 0000000..2000fee
> --- /dev/null
> +++ b/arch/frv/lib/perf_counter.c
> @@ -0,0 +1,19 @@
> +/* Performance counter handling
> + *
> + * Copyright (C) 2009 Red Hat, Inc. All Rights Reserved.
> + * Written by David Howells (dhowells@redhat.com)
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public Licence
> + * as published by the Free Software Foundation; either version
> + * 2 of the Licence, or (at your option) any later version.
> + */
> +
> +#include <linux/perf_counter.h>
> +
> +/*
> + * mark the performance counter as pending
> + */
> +void set_perf_counter_pending(void)
> +{
> +}

This could be avoided as well via a generic weak alias.

	Ingo

  reply	other threads:[~2009-07-01 21:10 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-30 21:24 [PATCH] FRV: Wire up new syscalls David Howells
2009-06-30 21:34 ` Ingo Molnar
2009-06-30 21:41   ` Arnd Bergmann
2009-06-30 21:54     ` Ingo Molnar
2009-07-01 11:28     ` David Howells
2009-07-01 11:54       ` Ingo Molnar
2009-07-01 12:19       ` David Howells
2009-07-01 12:36         ` Paul Mackerras
2009-07-01 12:41         ` David Howells
2009-07-01 13:13           ` Ingo Molnar
2009-07-01 14:10           ` David Howells
2009-07-01 14:49             ` Ingo Molnar
2009-07-01 16:47               ` [PATCH 1/2] FRV: Implement atomic64_t David Howells
2009-07-01 17:20                 ` Linus Torvalds
2009-07-01 21:11                   ` Ingo Molnar
2009-07-01 22:57                   ` [PATCH] x86: Code atomic(64)_read and atomic(64)_set in C not CPP [was Re: FRV: Implement atomic64_t] Paul Mackerras
2009-07-02  7:21                     ` [tip:x86/urgent] x86: Code atomic(64)_read and atomic(64)_set in C not CPP tip-bot for Paul Mackerras
2009-07-02  7:21                     ` [PATCH] x86: Code atomic(64)_read and atomic(64)_set in C not CPP [was Re: FRV: Implement atomic64_t] Ingo Molnar
2009-07-01 23:46                   ` [PATCH 1/2] FRV: Implement atomic64_t [ver #2] David Howells
2009-07-01 23:46                   ` [PATCH 2/2] FRV: Add basic performance counter support " David Howells
2009-07-02 21:10                   ` [PATCH 1/2] FRV: Implement atomic64_t Eric Dumazet
2009-07-02 21:28                     ` Linus Torvalds
2009-07-02 22:08                       ` [PATCH] x86: atomic64_t should be 8 bytes aligned Eric Dumazet
2009-07-02 23:53                         ` Linus Torvalds
2009-07-03  6:14                           ` Ingo Molnar
2009-07-03 12:42                           ` [tip:perfcounters/urgent] x86: atomic64: The atomic64_t data type should be 8 bytes aligned on 32-bit too tip-bot for Eric Dumazet
2009-07-03 16:58                             ` Linus Torvalds
2009-07-03 17:49                               ` H. Peter Anvin
2009-07-03 12:42                           ` [tip:perfcounters/urgent] x86: atomic64: Move the 32-bit atomic64_t implementation to a .c file tip-bot for Ingo Molnar
2009-07-03 16:47                             ` Linus Torvalds
2009-07-03 18:31                               ` [tip:perfcounters/urgent] x86: atomic64: Clean up atomic64_sub_and_test() and atomic64_add_negative() tip-bot for Ingo Molnar
2009-07-03 19:18                               ` tip-bot for Ingo Molnar
2009-07-04  0:05                             ` [tip:perfcounters/urgent] x86: atomic64: Move the 32-bit atomic64_t implementation to a .c file Paul Mackerras
2009-07-05 11:25                               ` Ingo Molnar
2009-07-03 12:43                           ` [tip:perfcounters/urgent] x86: atomic64: Improve atomic64_read() tip-bot for Eric Dumazet
2009-07-03 12:43                           ` [tip:perfcounters/urgent] x86: atomic64: Improve cmpxchg8b() tip-bot for Eric Dumazet
2009-07-03 12:43                           ` [tip:perfcounters/urgent] x86: atomic64: Improve atomic64_add_return() tip-bot for Ingo Molnar
2009-07-03 12:43                           ` [tip:perfcounters/urgent] x86: atomic64: Reduce size of functions tip-bot for Ingo Molnar
2009-07-03 12:44                           ` [tip:perfcounters/urgent] x86: atomic64: Fix unclean type use in atomic64_xchg() tip-bot for Ingo Molnar
2009-07-03 17:02                             ` Linus Torvalds
2009-07-03 18:00                               ` Ingo Molnar
2009-07-03 12:44                           ` [tip:perfcounters/urgent] x86: atomic64: Improve atomic64_read() tip-bot for Eric Dumazet
2009-07-03 14:50                             ` [PATCH -tip] x86: atomic64: inline atomic64_read() Eric Dumazet
2009-07-03 18:04                               ` Ingo Molnar
2009-07-03 18:10                                 ` Arjan van de Ven
2009-07-03 18:18                                   ` Ingo Molnar
2009-07-03 18:25                                     ` Andi Kleen
2009-07-03 18:30                                     ` Arjan van de Ven
2009-07-03 18:43                                       ` Ingo Molnar
2009-07-03 18:24                                   ` Andi Kleen
2009-07-03 18:31                                   ` [tip:perfcounters/urgent] x86: atomic64: Optimize CMPXCHG8B sequences to not use the LOCK prefix tip-bot for Ingo Molnar
2009-07-03 18:45                                     ` Ingo Molnar
2009-07-03 19:10                                 ` [PATCH -tip] x86: atomic64: inline atomic64_read() Linus Torvalds
2009-07-03 19:17                                   ` Ingo Molnar
2009-07-03 19:38                                     ` Linus Torvalds
2009-07-03 21:40                                       ` Ingo Molnar
2009-07-03 18:31                               ` [tip:perfcounters/urgent] x86: atomic64: Inline atomic64_read() again tip-bot for Eric Dumazet
2009-07-03 19:18                               ` tip-bot for Eric Dumazet
2009-07-04  9:49                               ` tip-bot for Eric Dumazet
2009-07-03 12:44                           ` [tip:perfcounters/urgent] x86: atomic64: Code atomic(64)_read and atomic(64)_set in C not CPP tip-bot for Paul Mackerras
2009-07-03 12:48                           ` tip-bot for Paul Mackerras
2009-07-03 12:48                           ` [tip:perfcounters/urgent] x86: atomic64: Improve atomic64_read() tip-bot for Eric Dumazet
2009-07-03 15:33                           ` [tip:perfcounters/urgent] x86: atomic64: Export APIs to modules tip-bot for Ingo Molnar
2009-07-03 18:30                             ` tip-bot for Ingo Molnar
2009-07-03 18:30                             ` [tip:perfcounters/urgent] x86: atomic64: Improve atomic64_xchg() tip-bot for Ingo Molnar
2009-07-03 12:01                       ` [patch] x86: atomic64_t: Improve atomic64_add_return() Ingo Molnar
2009-07-03 12:26                         ` [PATCH] x86: atomic64_t: _cmpxchg() & _read() optimizations Eric Dumazet
2009-07-03 12:40                           ` Ingo Molnar
2009-07-03 17:38                         ` [patch] x86: atomic64_t: Improve atomic64_add_return() Linus Torvalds
2009-07-03  6:05                     ` [PATCH 1/2] FRV: Implement atomic64_t Eric Dumazet
2009-07-03 12:27                       ` Ingo Molnar
2009-07-03 12:39                         ` Eric Dumazet
2009-07-03 11:17                     ` Ingo Molnar
2009-07-03 11:26                       ` Ingo Molnar
2009-07-01 17:33                 ` David Howells
2009-07-01 23:48                 ` David Howells
2009-07-01 16:47               ` [PATCH 2/2] FRV: Add basic performance counter support David Howells
2009-07-01 21:10                 ` Ingo Molnar [this message]
2009-07-01 15:19             ` [PATCH] FRV: Wire up new syscalls David Howells

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=20090701211017.GB631@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=torvalds@osdl.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®