This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] libdwfl: Use process_vm_readv when available.


On Tue, 2018-03-20 at 23:32 +0100, Mark Wielaard wrote:
> On Sun, Mar 18, 2018 at 01:43:23AM +0100, Mark Wielaard wrote:
> > If possible use process_vm_readv to read 4K blocks instead of fetching
> > each word individually with ptrace. For unwinding this often means we
> > only have to do one process_vm_readv of the stack instead of dozens of
> > ptrace calls. There is one 4K cache per process, cleared whenever a
> > thread is detached.
> 
> It seems to work well, but the GCC undefined sanitizer
> (configure --enable-sanitize-undefined) found an issue in the
> run-backtrace-native-biarch.sh testcase (from x86_64 to i686)
> when reading unaligned data. To fix that don't assign to the
> Dwarf_Word directly when unaligned, but use memcpy (which gcc
> seems to inline).

I pushed this to master now. Adding some comments about the word size
being actually architecture defined even though we use a 64bit
Dwarf_Word everywhere.

Cheers,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]