Re: frame unwinding patches
On Monday, April 3, 2017 11:23:25 PM CEST Jan Kratochvil wrote: > On Mon, 03 Apr 2017 11:00:03 +0200, Milian Wolff wrote: > > I just got a report from a colleague. As-is, elfutils would fail to unwind > > from the following location in his application: > > > > 0x1137ca4 > > > With the x86_64 patch applied, he got a proper backtrace: > > S/he has something wrong with the compiler. With > -fasynchronous-unwind-tables frame pointer unwinding is never needed > and gcc defaults to -fasynchronous-unwind-tables on x86_64. > > This is why I haven't implemented it originally as it only paper overs the > real problem and it leads to unreliable backtraces in longterm. Please reconsider: - In the example above, the address points into libnvidia-glcore.so and as such not compiled by my colleague but rather provided by NVidia as a binary blob. When you only got a binary blob and have to make do with it, you cannot tell people to "just fix the compiler invocation". - Some JIT compilers, like QV4, actually embed frame pointers into their dynamic code, but do not go the extra mile for generating DWARF data or asynchronous unwind tables. That is another case where the patches by Ulf excel and make elfutils much more useful. Please, as a user of elfutils I strongly hope that this patch set gets accepted. In general, similar patches that make it more resilient in the face of broken setups should also at least get considered instead of right-out rejected because "something is broken". Things break all the time, but developers often have to live with the brokenness. Cheers -- Milian Wolff m...@milianw.de http://milianw.de
Re: frame unwinding patches
On Tue, 04 Apr 2017 09:40:06 +0200, Milian Wolff wrote: > - In the example above, the address points into libnvidia-glcore.so and as > such not compiled by my colleague but rather provided by NVidia as a binary > blob. When you only got a binary blob and have to make do with it, you cannot > tell people to "just fix the compiler invocation". This is their problem they support a vendor who cripples usage of their products. There is also Intel and AMD. > - Some JIT compilers, like QV4, actually embed frame pointers into their > dynamic code, but do not go the extra mile for generating DWARF data or > asynchronous unwind tables. That is another case where the patches by Ulf > excel and make elfutils much more useful. In such case elfutils could provide some workaround with a new eu-stack option: --please-workaround-a-completely-broken-compiler-i-still-have-not-fixed :-) Jan
Re: frame unwinding patches
- In the example above, the address points into libnvidia-glcore.so and as such not compiled by my colleague but rather provided by NVidia as a binary blob. When you only got a binary blob and have to make do with it, you cannot tell people to "just fix the compiler invocation". This is their problem they support a vendor who cripples usage of their products. There is also Intel and AMD. Sorry, but I cannot tell everybody with binary-only graphics drivers that they cannot use perfparser. That's probably the majority of embedded devices and a large number of desktops. - Some JIT compilers, like QV4, actually embed frame pointers into their dynamic code, but do not go the extra mile for generating DWARF data or asynchronous unwind tables. That is another case where the patches by Ulf excel and make elfutils much more useful. In such case elfutils could provide some workaround with a new eu-stack option: --please-workaround-a-completely-broken-compiler-i-still-have-not-fixed Frame pointers are the easiest way to include unwinding information into a binary and they require less work from the compiler than other methods. With JIT compilers, compile time matters much more than with ahead of time compilers. Also, adding extra code to the compiler has to be justified in that case as the compiler is shipped inside the libQt5Qml binary and loaded into memory whenever you run some QML. So, I think frame pointers are a perfectly valid option for unwinding and should be supported.