lkml.org 
[lkml]   [2019]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/4] gcov: clang: move common gcc code into gcc_base.c
From
Date
On 14.01.2019 22:04, Tri Vo wrote:
> From: Greg Hackmann <ghackmann@google.com>
>
> base.c contains a few callbacks specific to GCC's gcov implementation.
> Move these into their own module in preparation for clang support.

Minor nitpick: at least in commit messages, a consistent capitalization
of "Clang" would be preferable.

> diff --git a/kernel/gcov/Makefile b/kernel/gcov/Makefile
> index ff06d64df397..45431ed679d1 100644
> --- a/kernel/gcov/Makefile
> +++ b/kernel/gcov/Makefile

[...]

> -void __gcov_merge_icall_topn(gcov_type *counters, unsigned int n_counters)
> -{
> - /* Unused. */
> -}
> -EXPORT_SYMBOL(__gcov_merge_icall_topn);
> +int gcov_events_enabled;
> +DEFINE_MUTEX(gcov_lock);
>
> void __gcov_exit(void)
> {

Unless __gcov_exit() is required by Clang, it should also be moved.

> diff --git a/kernel/gcov/gcc_base.c b/kernel/gcov/gcc_base.c
> new file mode 100644
> index 000000000000..823565bcf9bf
> --- /dev/null
> +++ b/kernel/gcov/gcc_base.c
> @@ -0,0 +1,79 @@
> +// SPDX-License-Identifier: GPL-2.0
> +
> +#include <linux/kernel.h>
> +#include <linux/mutex.h>

linux/export.h should be included for the EXPORT_SYMBOL() macro.


--
Peter Oberparleiter
Linux on Z Development - IBM Germany

\
 
 \ /
  Last update: 2019-01-16 16:34    [W:0.089 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site