[RTEMS Project] #4383: covoar keeps DWARF info in memory too long
RTEMS trac
trac at rtems.org
Thu Apr 8 17:50:07 UTC 2021
#4383: covoar keeps DWARF info in memory too long
-------------------------+------------------------------
Reporter: Alex White | Owner: (none)
Type: defect | Status: new
Priority: normal | Milestone: 6.1
Component: tool | Version: 6
Severity: normal | Keywords: coverage, covoar
Blocked By: | Blocking:
-------------------------+------------------------------
To get covoar working again, the ELF and DWARF info cleanup was moved from
the `ExecutableInfo` constructor to the `ExecutableInfo` destructor.
Without this change, covoar would report the locations of symbols as
`unknown:-1`. This is because the DWARF info is used later in the
`ExecutableInfo::getSourceAndLine()` method with a call to
`debug.get_source()`.
This caused a new issue: the ELF and DWARF info is now held in memory for
the life of the program. This causes very high memory usage when running
covoar, more than 10 GB for some BSPs.
A quick and dirty solution is to find what is being referenced in
`debug.get_source()` and preserve it after `debug.end()` is called. It
appears that refraining from calling `cus.clear()` in
`rld::dwarf::file::end()` would be a good place to start. Additionally,
the `rld::dwarf::sources` class will likely need to be changed to copy out
the DWARF source file info.
--
Ticket URL: <http://devel.rtems.org/ticket/4383>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list