<div dir="ltr">Hey,<br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 3, 2015 at 12:09 PM, Maarten Hoes <span dir="ltr"><<a href="mailto:hoes.maarten@gmail.com" target="_blank">hoes.maarten@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><br><br>On Sat, Jan 3, 2015 at 12:37 AM, Jens Tröger <<a href="mailto:jens.troeger@light-speed.de" target="_blank">jens.troeger@light-speed.de</a>> wrote:<br>><br>> Thank you, Maarten,<br>><br>> I've run office like so from within the Python script:<br>><br>>   p = subprocess.Popen("valgrind --tool=callgrind soffice --accept=\"socket,host=localhost,port=2002;urp;StarOffice.ServiceManager\"", shell=True, env=myenv)<br>><br>> and got five callgrind.out.* files once the script terminated soffice.<br>> I ran those through<br>><br>>   callgrind_annotate callgrind.out.*<br>><br>> Note that I'm using the default office image which (I assume) has no<br>> debug symbols.  The data doesn't make much sense.  Considering the loop<br>> in question ran for about ~45sec (with and without valgrind?!) then I'd<br>> expect an instruction count _much_ larger than a few hundreds of<br>> thousands.  In all four profiles, though, libc's _dl_addr and ld's symbol<br>> lookup take most of the time.  Not sure I trust these profiles.<br>><br>> Attached.<br>><br>> Jens<br>><br><br><br></span>Yes, it looks like you are using the libreoffice rpm/deb package that was installed on your linux distribution in '/usr/bin/soffice'. I dont think that that one will have debugging symbols (at least, not by default. Fedora allows you to install 'libreoffice-debuginfo', not sure about Ubuntu). <br><br>Im not sure if this will change anything, but could you use the build that sits in the sourcetree in 'instdir/program/soffice' when the build finishes ? Specify it with the full absolute path, like for example :<br><br>/home/buildslave/source/libo-core/instdir/program/soffice <br><br>It appears that the default way to build libreoffice, if you dont explicitly specify otherwise, is to include the debug symbols (my build has them).<span class="HOEnZb"><font color="#888888"><br><br></font></span><br></div></blockquote><div><br></div><div>Nearly all distros provide debuginfos that will make the callgrind output somewhat nicer. In a self build tree you need to use --enable-symbols as option (no enable-debug or enable-dbgutil as they will remove the optimization that is necessary for useful profiling). <br><br></div><div>To analyze the callgrind output you should use kcachegrind which provides a nice UI to go through the results.<br><br></div><div>Regards,<br></div><div>Markus<br></div></div></div></div>