<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Mar 25, 2015, at 11:56 AM, Matt Cross <<a href="mailto:matt.cross@gmail.com">matt.cross@gmail.com</a>> wrote:</div><blockquote type="cite"><div dir="ltr"><div>I am working with something that does a lot of SHA1's.  I am trying to profile my application and generate flame graphs (see <a href="http://www.brendangregg.com/flamegraphs.html">http://www.brendangregg.com/flamegraphs.html</a> ), but profiling tools cannot successfully backtrace when the processor is running the optimized SHA1 code on x86_64.  This patch adds CFI directives when compiled with a GNU assembler to enable tools that understand DWARF debugging information to backtrace in this circumstance.</div></div></blockquote><div><br></div><div><br></div><div>FYI, I submitted a patch a few years ago to do this for many of the x86-32 assembly files. The perlasm preprocessor already tries to track the stack offset, which means that a lot of those .cfi directives can be generated automatically, without requiring the programmer to keep track of them.</div><div><br></div><div>The patches are here:</div><div>   <a href="http://rt.openssl.org/Ticket/Display.html?id=2562">http://rt.openssl.org/Ticket/Display.html?id=2562</a></div><div><br></div><div>As you point out, this is pretty useful to allow profiling and/or debugging code that spends a lot of its time in OpenSSL.</div><div><br></div><div><br></div></div></body></html>