mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
To: Yuan Pengfei <yuanpf12@sei.pku.edu.cn>,
	"'Andi Kleen'" <andi@firstfloor.org>
Cc: "'Andrew Morton'" <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] gcov: add support for GCC 4.9
Date: Wed, 14 May 2014 10:18:29 +0200	[thread overview]
Message-ID: <537326D5.7040802@linux.vnet.ibm.com> (raw)
In-Reply-To: <001f01cf6f2c$d4e62350$7eb269f0$@sei.pku.edu.cn>

On 14.05.2014 06:27, Yuan Pengfei wrote:
> From: Yuan Pengfei <coolypf@qq.com>
> 
> This patch handles the gcov-related changes in GCC 4.9:
>   A new counter (time profile) is added. The total number is 9 now.
>   A new profile merge function __gcov_merge_time_profile is added.
> See gcc/gcov-io.h and libgcc/libgcov-merge.c
> For the first change, the layout of struct gcov_info is affected.
> For the second one, a dummy function is added to kernel/gcov/base.c similarly.
> Signed-off-by: Yuan Pengfei <coolypf@qq.com>

Looks good. Tested successfully on s390x with both GCC 4.9 and GCC 4.3.4.

Acked-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>

> ---
>  kernel/gcov/base.c    | 6 ++++++
>  kernel/gcov/gcc_4_7.c | 5 +++++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/kernel/gcov/base.c b/kernel/gcov/base.c
> index f45b75b..b358a80 100644
> --- a/kernel/gcov/base.c
> +++ b/kernel/gcov/base.c
> @@ -85,6 +85,12 @@ void __gcov_merge_ior(gcov_type *counters, unsigned int n_counters)
>  }
>  EXPORT_SYMBOL(__gcov_merge_ior);
> 
> +void __gcov_merge_time_profile(gcov_type *counters, unsigned int n_counters)
> +{
> +	/* Unused. */
> +}
> +EXPORT_SYMBOL(__gcov_merge_time_profile);
> +
>  /**
>   * gcov_enable_events - enable event reporting through gcov_event()
>   *
> diff --git a/kernel/gcov/gcc_4_7.c b/kernel/gcov/gcc_4_7.c
> index 7465944..7f74b59 100644
> --- a/kernel/gcov/gcc_4_7.c
> +++ b/kernel/gcov/gcc_4_7.c
> @@ -18,7 +18,12 @@
>  #include <linux/vmalloc.h>
>  #include "gcov.h"
> 
> +#if __GNUC__ == 4 && __GNUC_MINOR__ >= 9
> +#define GCOV_COUNTERS			9
> +#else
>  #define GCOV_COUNTERS			8
> +#endif
> +
>  #define GCOV_TAG_FUNCTION_LENGTH	3
> 
>  static struct gcov_info *gcov_info_head;
> 


-- 
Peter Oberparleiter
Linux on System z Development - IBM Germany


      reply	other threads:[~2014-05-14  8:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14  4:27 Yuan Pengfei
2014-05-14  8:18 ` Peter Oberparleiter [this message]

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=537326D5.7040802@linux.vnet.ibm.com \
    --to=oberpar@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuanpf12@sei.pku.edu.cn \
    /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

Powered by JetHome