[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] coverage: filter out lib{fdt,elf}-temp.o


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 18 Jan 2024 15:40:39 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xIR727PwCrXm63AcgfLEjxquDttB1v/yS0/QIU8wo/s=; b=JvWa7N1Dly0qax2fx70JPleURxjQj3tq3ips6yyRHbgAF9i3qGVTANpeDiX/HcKAbicgbZrFjd5jujfK/1zWzsfUjwFdfti89oRgdiqjxGUV2atMqNrbdT/8KduG48GeQoJ2fXVX6W3KljNa4iFpzCPHFaHucz8FEv6HFmTCpsWh0UvglK1czIG6f71u2T94U8EcM0q6vrEosCBVP+/y04nTgh/67irhH2ynGAVGaM4ZpBymhjpjghwbAD73sNf4DN1A64VAKFd4iN0bht9Nfvo8/WonG/Qjh5TLoEuAAWcEpah0ilVoXkaYC+LS7jF5q+Cb0whVpw/FqTUVJWMD9A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IzXmB6W6YtAlwrFJnQ5LzcyhFLjeNnEUTqHaHrnHH2ByPgkUUpYGnfWk3fW84J+8PjmYg1BBL+iFqUIg2pHbQdA7I9aQZzUou1X3t6Wt5HKK6JN6Z5+AjIpzZho2ZwX7raudmpZBk58O7IdXgPMWfJTC0uOQdeURc3Znxy664R2Ijoh0pK5IpXviqbIK+BHlD+mdXwxZFpM0t02G+TUNRlUfth1v+Rzyt05bPNgfmNF8dp1jqR3FrLc//59cAyl7hY8CMudye6J6pXNEY8+UA0B4e9kuyoeP99W6OlgYjeCy92L0t+b30eH3Nq3nXokTBdDq6WywwKCfKL36lL4CJQ==
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Javi Merino <javi.merino@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 18 Jan 2024 14:41:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Jan,

On 18/01/2024 14:12, Jan Beulich wrote:
> 
> 
> On 18.01.2024 13:06, Michal Orzel wrote:
>> At the moment, trying to run xencov read/reset (calling SYSCTL_coverage_op
>> under the hood) results in a crash. This is due to an attempt to
>> access code in the .init.* sections (libfdt for Arm and libelf for x86)
>> that are stripped after boot. Normally, the build system compiles any
>> *.init.o file without COV_FLAGS. However, these two libraries are
>> handled differently as sections will be renamed to init after linking.
>>
>> This worked until e321576f4047 ("xen/build: start using if_changed")
>> that added lib{fdt,elf}-temp.o to extra-y. Any file listed there without
>> *.init.o suffix will be part of non-init-objects for which COV_FLAGS
>> will be appended.
> 
> While this is true, aiui COV_FLAGS would be empty for anything listed
> in nocov-y and all of the prerequisites of those objects (iirc target-
> specific variable settings propagate to prerequisites). Therefore ...
I'm not sure about this propagation.

> 
>> In such case, the solution is to add a file to nocov-y.
> 
> ... libelf.o / libfdt.o already being listed there ought to suffice.
> Alternatively listing only libelf-temp.o / libfdt-temp.o ought to
> suffice as well.
> 
> Since you apparently observed things not working, I must be missing
> something.
As I wrote on Matrix, I'm not a build system expert so it might be that the 
issue
is due to something else. I managed to find a commit after which building the 
libfdt/libelf
with coverage enabled resulted in .gcno files being present. This commit added 
libfdt-temp.o
(same as libfdt.o but without sections renaming) to extra-y, hence my fix.

~Michal



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.