Re: Using sysprof with 64bits linux

On 05/02/2017 07:04 AM, Jean-Marc Lasgouttes wrote:
Thanks for the answer. I was not using -ggdb (plain -g instead), so I
tried that. However, I do not understand why you use -O0. Doesn't it
defeat the purpose of the profiler? I though it should be used with the
optimization level to be used in the real world.

Remember that -O2 will truncate many function calls within the same
module. So if you want reliable stack frames to determine what function
time is spent, you need to ensure that real stack frames are pushed onto
the stack. -O0 increases the chance for this.

Also note that we are a sampling profiler. I'd like for us to have a
tracing backend some day, which might help more for your tuning.

With LyX, in profiling mode (which is selectable via configure) I end up

AM_CXXFLAGS = -g -O2 -std=c++14  -fno-omit-frame-pointer

I changed that to repalce -g with -ggdb and gave it a go.

(-ggdb is probably the default for -g)

I'm not sure how long it's been since you used Sysprof, but many years
ago (when 32-bit x86 was prevalent), Sysprof used a custom kernel
modules to get data. A while back it was changed to use the Linux perf
kernel module. There are some differences in implementation.

I have tried both the old style version on my antique unbuntu 12.04 and
the new 3.34.1 on ubuntu 17.10. On this last one, the capture stored here
shows the kind of result that I obtain when looking at the src/lyx
process. I doubt that all the action happens in some weird kernel

Can you try recording with `sudo perf record` and then display the
recording with `sudo perf report`? I'm curious if you get different
output than we are displaying. If so, we definitely need to investigate
a bug. If not, we need to improve kernel perf :)

-- Christian

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