summaryrefslogtreecommitdiffstats
path: root/kernel/gcov/gcov.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2021-05-06 18:04:45 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-05-07 00:26:32 -0700
commit7a1d55b987dfcbddecdb67eecc76fe555d4348ba (patch)
tree12ac256cc9892de76012263e3d17128fabf6f9de /kernel/gcov/gcov.h
parentb2075dbb15d7ae952aeb01331198f4dc45a7e46a (diff)
downloadlinux-stable-7a1d55b987dfcbddecdb67eecc76fe555d4348ba.tar.gz
linux-stable-7a1d55b987dfcbddecdb67eecc76fe555d4348ba.tar.bz2
linux-stable-7a1d55b987dfcbddecdb67eecc76fe555d4348ba.zip
gcov: combine common code
There's a lot of duplicated code between gcc and clang implementations, move it over to fs.c to simplify the code, there's no reason to believe that for small data like this one would not just implement the simple convert_to_gcda() function. Link: https://lkml.kernel.org/r/20210315235453.e3fbb86e99a0.I08a3ee6dbe47ea3e8024956083f162884a958e40@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/gcov/gcov.h')
-rw-r--r--kernel/gcov/gcov.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/kernel/gcov/gcov.h b/kernel/gcov/gcov.h
index 6ab2c1808c9d..912b8ea01d33 100644
--- a/kernel/gcov/gcov.h
+++ b/kernel/gcov/gcov.h
@@ -48,6 +48,7 @@ struct gcov_info *gcov_info_next(struct gcov_info *info);
void gcov_info_link(struct gcov_info *info);
void gcov_info_unlink(struct gcov_info *prev, struct gcov_info *info);
bool gcov_info_within_module(struct gcov_info *info, struct module *mod);
+size_t convert_to_gcda(char *buffer, struct gcov_info *info);
/* Base interface. */
enum gcov_action {
@@ -58,16 +59,9 @@ enum gcov_action {
void gcov_event(enum gcov_action action, struct gcov_info *info);
void gcov_enable_events(void);
-/* Iterator control. */
-struct seq_file;
-struct gcov_iterator;
-
-struct gcov_iterator *gcov_iter_new(struct gcov_info *info);
-void gcov_iter_free(struct gcov_iterator *iter);
-void gcov_iter_start(struct gcov_iterator *iter);
-int gcov_iter_next(struct gcov_iterator *iter);
-int gcov_iter_write(struct gcov_iterator *iter, struct seq_file *seq);
-struct gcov_info *gcov_iter_get_info(struct gcov_iterator *iter);
+/* writing helpers */
+size_t store_gcov_u32(void *buffer, size_t off, u32 v);
+size_t store_gcov_u64(void *buffer, size_t off, u64 v);
/* gcov_info control. */
void gcov_info_reset(struct gcov_info *info);