libunwind-devel
[Top][All Lists]
Advanced

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

Re: [Libunwind-devel] Backtrace performance on x86-64 based on Dwarf inf


From: Milian Wolff
Subject: Re: [Libunwind-devel] Backtrace performance on x86-64 based on Dwarf info
Date: Wed, 04 Jun 2014 15:45:52 +0200
User-agent: KMail/4.13.1 (Linux/3.14.4-1-ARCH; KDE/4.13.1; x86_64; ; )

On Wednesday 04 June 2014 15:28:10 Milian Wolff wrote:
> On Tuesday 03 June 2014 09:53:02 Arun Sharma wrote:
> > On Tue, Jun 3, 2014 at 6:18 AM, Milian Wolff <address@hidden> wrote:
> > > To me that does not look like a failure :)
> > 
> > Yeah, I'll fix up the test too unless this breaks any of the stuff
> > Lassi may be aware of.
> 
> I just noticed an issue with adding the simple !bdp check to Gtrace.c - it
> leads to an early cancellation of the backtraces when sections without debug
> symbols are encountered:
> 
> ...
> 0x7f868820167a QMapData::node_create(QMapData::Node**, int, int)
> /usr/lib/libQtCore.so.4
> 0x7f86886ea740 ? /usr/lib/libkdecore.so.5
> 0x7f86886fa986 ? /usr/lib/libkdecore.so.5
> 0x7f86886fafc4 ? /usr/lib/libkdecore.so.5
> 0x7f86886e4320 ? /usr/lib/libkdecore.so.5
> 0x7f86886e4731 KConfig::KConfig(QString const&, QFlags<KConfig::OpenFlag>,
> char const*) /usr/lib/libkdecore.so.5
> ... more useful information here
> 
> becomes
> 
> ...
> 0x7f868820167a QMapData::node_create(QMapData::Node**, int, int)
> /usr/lib/libQtCore.so.4
> 
> For my use-case this is unacceptable. Any idea what might be going on here?
> Any information you would like me to get you?

Note: this patch seems to work just fine for me, but I don't know whether it 
breaks anything else... At least the tests work just fine with it! So, do you 
see any other problems with it?

diff --git a/src/x86_64/Gstash_frame.c b/src/x86_64/Gstash_frame.c
index 962b103..65abc61 100644
--- a/src/x86_64/Gstash_frame.c
+++ b/src/x86_64/Gstash_frame.c
@@ -51,7 +51,8 @@ tdep_stash_frame (struct dwarf_cursor *d, struct 
dwarf_reg_state *rs)
       && (rs->reg[DWARF_CFA_REG_COLUMN].val == RBP
          || rs->reg[DWARF_CFA_REG_COLUMN].val == RSP)
       && labs(rs->reg[DWARF_CFA_OFF_COLUMN].val) < (1 << 29)
-      && DWARF_GET_LOC(d->loc[d->ret_addr_column]) == d->cfa-8
+      && (DWARF_IS_NULL_LOC(d->loc[d->ret_addr_column])
+          || DWARF_GET_LOC(d->loc[d->ret_addr_column]) == d->cfa-8)
       && (rs->reg[RBP].where == DWARF_WHERE_UNDEF
          || rs->reg[RBP].where == DWARF_WHERE_SAME
          || (rs->reg[RBP].where == DWARF_WHERE_CFAREL

Bye
-- 
Milian Wolff
address@hidden
http://milianw.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]