All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] um: fix up CONFIG_GCOV support
@ 2021-03-12  9:55 ` Johannes Berg
  0 siblings, 0 replies; 21+ messages in thread
From: Johannes Berg @ 2021-03-12  9:55 UTC (permalink / raw)
  To: linux-kernel, linux-um; +Cc: Jessica Yu, Alexander Viro, linux-fsdevel

CONFIG_GCOV is fairly useful for ARCH=um (e.g. with kunit, though
my main use case is a bit different) since it writes coverage data
directly out like a normal userspace binary. Theoretically, that
is.

Unfortunately, it's broken in multiple ways today:

 1) it doesn't like, due to 'mangle_path' in seq_file, and the only
    solution to that seems to be to rename our symbol, but that's
    not so bad, and "mangle_path" sounds very generic anyway, which
    it isn't quite

 2) gcov requires exit handlers to write out the data, and those are
    never called for modules, config CONSTRUCTORS exists for init
    handlers, so add CONFIG_MODULE_DESTRUCTORS here that we can then
    select in ARCH=um

 3) As mentioned above, gcov requires init/exit handlers, but they
    aren't linked into binary properly, that's easy to fix.

 4) gcda files are then written, so .gitignore them

 5) it's not always useful to create coverage data for the *entire*
    kernel, so I've split off CONFIG_GCOV_BASE from CONFIG_GCOV to
    allow option in only in some places, which of course requires
    adding the necessary "subdir-cflags" or "CFLAGS_obj" changes in
    the places where it's desired, as local patches.


None of these changes (hopefully) seem too controversional, biggest
are the module changes but obviously they compile to nothing if the
architecture doesn't WANT_MODULE_DESTRUCTORS.

Any thoughts on how to merge this? The seq_file/.gitignore changes
are independent at least code-wise, though of course it only works
with the seq_file changes (.gitignore doesn't matter, of course),
while the module changes are a requirement for the later ARCH=um
patches since the Kconfig symbol has to exist.

Perhaps I can just get ACKs on all the patches and then they can go
through the UML tree?

Thanks,
johannes



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2021-03-18 21:32 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12  9:55 [PATCH 0/6] um: fix up CONFIG_GCOV support Johannes Berg
2021-03-12  9:55 ` Johannes Berg
2021-03-12  9:55 ` [PATCH 1/6] seq_file: rename mangle_path to seq_mangle_path Johannes Berg
2021-03-12  9:55   ` Johannes Berg
2021-03-12  9:55 ` [PATCH 2/6] module: add support for CONFIG_MODULE_DESTRUCTORS Johannes Berg
2021-03-12  9:55   ` Johannes Berg
2021-03-12 10:26   ` Johannes Berg
2021-03-12 10:26     ` Johannes Berg
2021-03-12  9:55 ` [PATCH 3/6] .gitignore: also ignore gcda files Johannes Berg
2021-03-12  9:55   ` Johannes Berg
2021-03-12  9:55 ` [PATCH 4/6] um: split up CONFIG_GCOV Johannes Berg
2021-03-12  9:55   ` Johannes Berg
2021-03-18 21:27   ` Brendan Higgins
2021-03-18 21:27     ` Brendan Higgins
2021-03-18 21:30     ` Johannes Berg
2021-03-12  9:55 ` [PATCH 5/6] um: fix CONFIG_GCOV for built-in code Johannes Berg
2021-03-12  9:55   ` Johannes Berg
2021-03-12  9:55 ` [PATCH 6/6] um: fix CONFIG_GCOV for modules Johannes Berg
2021-03-12  9:55   ` Johannes Berg
2021-03-12 14:33 ` [PATCH 0/6] um: fix up CONFIG_GCOV support Johannes Berg
2021-03-12 14:33   ` Johannes Berg

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.