From: J L. <joh...@ho...> - 2020-07-21 21:47:23
|
On 7/21/20 9:48 AM, William Cohen wrote: > On 7/20/20 9:03 PM, J Lumby wrote: >> Oprofiling an intensive postgresql workload running on a Lenovo P52 and lniux kernel 5.7.4, I see very high numbers of both of these : approximately two-thirds of all user-space samples are being lost. see operf.log below >> >> > Hi, > > Which version of oprofile was being used? I just did a release of oprofile-1.4.0 it has commit [a3742f]: That run was on 1.3.0 > > Use the mmap offset to correctly compute the IP location in a file > > Newer versions of binutils are now now splitting the file into > multiple mmap loads. The assumption that the mmap for the executable > code in the file starts at the beginning of the file (that the file > offset is always zero) is no longer true. The computation to convert > the IP address into an offset needs to also use the offset. > > I wonder if maybe that a number of the samples might be discarded because they are not being mapped to reasonable locations in executables. > > Could you give that new release of oprofile a try? > > -Will I saw 1.4.0 available almost immediately after I posted that. I've now tried the same run on 1.4.0 (compiled on the target machine just to be sure it compiles with the same bfd headers and libs) and there are mixed results. It is still losing 80% of all userspace events : see below; but also the reports now show a completely different and much more "what-I-would-expect" list of tickcounts by function, so maybe I can make do with this release. But this improvement makes me wonder if maybe the fix is in the right direction but not quite there yet. Is that possible? Would switching on the -V "all' debugging help narrow down what is happening? Also if you can point me to the code changes I can take a look and maybe spot something. Cheers, John ___________________________________________________________ on 1.4.0 operf --vmlinux /mnt/bullbild/linux-5.7.4-bullarch/vmlinux --session-dir /tmp/oprof_session.200721-173111 --events cpu_clk_unhalted:50000000:thread:1:1 --callgraph --separate-cpu --system-wide Profiling started at Tue Jul 21 17:31:11 2020 Profiling stopped at Tue Jul 21 17:33:30 2020 -- OProfile/operf Statistics -- Nr. non-backtrace samples: 12423 Nr. kernel samples: 2170 Nr. user space samples: 10253 Nr. samples lost due to sample address not in expected range for domain: 0 Nr. lost kernel samples: 0 Nr. samples lost due to sample file open failure: 0 Nr. samples lost due to no permanent mapping: 8031 Nr. user context kernel samples lost due to no app info available: 0 Nr. user samples lost due to no app info available: 0 Nr. backtraces skipped due to no file mapping: 8029 Nr. hypervisor samples dropped due to address out-of-range: 0 Nr. samples lost reported by perf_events kernel: 0 |