From: Arnd Bergmann <arnd@kernel.org>
To: Peter Oberparleiter <oberpar@linux.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org
Subject: [PATCH] gcov: add prototypes for internal functions
Date: Wed, 17 May 2023 14:50:07 +0200 [thread overview]
Message-ID: <20230517125011.930274-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
gcov uses global functions that are called from generated code,
but these have no prototype in a header, which causes a W=1
build warning:
kernel/gcov/gcc_base.c:12:6: error: no previous prototype for '__gcov_init' [-Werror=missing-prototypes]
kernel/gcov/gcc_base.c:40:6: error: no previous prototype for '__gcov_flush' [-Werror=missing-prototypes]
kernel/gcov/gcc_base.c:46:6: error: no previous prototype for '__gcov_merge_add' [-Werror=missing-prototypes]
kernel/gcov/gcc_base.c:52:6: error: no previous prototype for '__gcov_merge_single' [-Werror=missing-prototypes]
Add prototypes for all of these to an internal header.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
kernel/gcov/gcov.h | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/kernel/gcov/gcov.h b/kernel/gcov/gcov.h
index 912b8ea01d33..6df99772406c 100644
--- a/kernel/gcov/gcov.h
+++ b/kernel/gcov/gcov.h
@@ -82,4 +82,34 @@ extern const struct gcov_link gcov_link[];
extern int gcov_events_enabled;
extern struct mutex gcov_lock;
+void __gcov_init(struct gcov_info *info);
+void __gcov_flush(void);
+void __gcov_merge_add(gcov_type *counters, unsigned int n_counters);
+void __gcov_merge_single(gcov_type *counters, unsigned int n_counters);
+void __gcov_merge_delta(gcov_type *counters, unsigned int n_counters);
+void __gcov_merge_ior(gcov_type *counters, unsigned int n_counters);
+void __gcov_merge_time_profile(gcov_type *counters, unsigned int n_counters);
+void __gcov_merge_icall_topn(gcov_type *counters, unsigned int n_counters);
+void __gcov_exit(void);
+
+size_t convert_to_gcda(char *buffer, struct gcov_info *info);
+void gcov_info_add(struct gcov_info *dst, struct gcov_info *src);
+struct gcov_info *gcov_info_dup(struct gcov_info *info);
+const char *gcov_info_filename(struct gcov_info *info);
+void gcov_info_free(struct gcov_info *info);
+int gcov_info_is_compatible(struct gcov_info *info1, struct gcov_info *info2);
+void gcov_info_link(struct gcov_info *info);
+struct gcov_info *gcov_info_next(struct gcov_info *info);
+void gcov_info_reset(struct gcov_info *info);
+void gcov_info_unlink(struct gcov_info *prev, struct gcov_info *info);
+unsigned int gcov_info_version(struct gcov_info *info);
+bool gcov_info_within_module(struct gcov_info *info, struct module *mod);
+void llvm_gcda_emit_arcs(u32 num_counters, u64 *counters);
+void llvm_gcda_emit_function(u32 ident, u32 func_checksum, u32 cfg_checksum);
+void llvm_gcda_end_file(void);
+void llvm_gcda_start_file(const char *orig_filename, u32 version, u32 checksum);
+void llvm_gcda_summary_info(void);
+typedef void (*llvm_gcov_callback)(void);
+void llvm_gcov_init(llvm_gcov_callback writeout, llvm_gcov_callback flush);
+
#endif /* GCOV_H */
--
2.39.2
next reply other threads:[~2023-05-17 12:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-17 12:50 Arnd Bergmann [this message]
2023-06-21 12:28 ` [PATCH] gcov: add prototypes for internal functions Peter Oberparleiter
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=20230517125011.930274-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=oberpar@linux.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.