Issue metadata
Sign in to add a comment
|
perf: samples not mapped to the kernel or the kernel modules |
||||||||||||||||||||||
Issue descriptionChrome Version: 64 Chrome OS Version: 10042.0.0 Chrome OS Platform: multiple perf is broken on CrOS 10042+, on multiple boards and kernel versions. For detection context, see b/68045463. I confirmed the issue on a lars board with kernel 3.18. 1) I installed image R64-10042.0.0. While playing youtube in Chrome, I ran $ perf record -a -e cycles -c 1000003 sleep 3 $ perf report -s dso Warning: Kernel address maps (/proc/{kallsyms,modules}) were restricted. Check /proc/sys/kernel/kptr_restrict before running 'perf record'. As no suitable kallsyms nor vmlinux was found, kernel samples can't be resolved. Samples in kernel modules can't be resolved as well. # To display the perf.data header info, please use --header/--header-only # options. # # # Total Lost Samples: 0 # # Samples: 1K of event 'cycles' # Event count (approx.): 1239003717 # # Overhead Shared Object # ........ ...................... # 45.52% [unknown] 42.13% chrome 3.55% libpthread-2.23.so 2.10% libc-2.23.so 1.29% i965_dri.so 1.13% perf-9261.map 0.97% i965_drv_video.so 0.81% libstdc++.so.6.0.20 0.65% [vdso] 0.48% cras 0.40% libEGL.so.1.0.0 0.24% libdrm_intel.so.1.0.0 0.16% libbase-core-395517.so 0.16% libcras.so.0.0.0 0.08% ld-2.23.so 0.08% libm-2.23.so 0.08% perf-4443.map 0.08% perf-4908.map 0.08% perf-5747.map 45.5% of samples associated with an unknown module. 2) I installed image R64-10041.0.0. While playing youtube in Chrome, I ran $ perf record -a -e cycles -c 1000003 sleep 3 $ perf report -s dso # To display the perf.data header info, please use --header/--header-only # options. # # # Total Lost Samples: 0 # # Samples: 1K of event 'cycles' # Event count (approx.): 1805005415 # # Overhead Shared Object # ........ ..................... # 59.61% chrome 29.42% [kernel.kallsyms] 2.71% libpthread-2.23.so 1.88% perf-3649.map 1.77% i965_dri.so 1.50% libc-2.23.so 0.78% i965_drv_video.so 0.66% libstdc++.so.6.0.20 0.44% perf-3921.map 0.33% libdrm_intel.so.1.0.0 0.17% [vdso] 0.11% libart.so 0.11% libm-2.23.so 0.11% libva.so.1.4000.0 0.06% libEGL.so.1.0.0 0.06% libGLESv2.so.2.0.0 0.06% libasound.so.2.0.0 0.06% libglapi.so.0.0.0 0.06% perf-3501.map 0.06% perf-3712.map 0.06% perf-4022.map 29.4% of the samples are mapped to the kernel. No unknown module. Running perf report -D on the perf data files collected at (1) and (2) shows that for image 10042.0.0 there are no MMAP events for the kernel or any kernel modules. For case (1), see also the warning: "Kernel address maps (/proc/{kallsyms,modules}) were restricted." printed when running perf report, so this seems to be related. It looks like something has changed in 10042 that denies perf access to /proc/kallsyms and /proc/modules. What is the impact to the user, and is there a workaround? If so, what is it? This breaks go/cwp. We also just started releasing kernels compiled with AutoFDO profiles generated from CWP data. Not being able to collect perf data for the kernel will break that pipeline in a few weeks. I am attaching the output of 'perf report -D | grep MMAP' for the two perf data files collected at (1) and (2).
,
Oct 20 2017
The change was introduced in https://chrome-internal-review.googlesource.com/c/chromeos/cheets-scripts/+/481553 +cmtm@ Christopher, kptr_restrict needs to be set to 2? Can we set it to 1 instead?
,
Oct 21 2017
sysctl settings should really be done on a common/global basis and not in ARC++ specific init
,
Oct 23 2017
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/cheets-scripts/+/7d7646da2e42d3824ba29f225336711570ebc92c commit 7d7646da2e42d3824ba29f225336711570ebc92c Author: Gabriel Marin <gmx@chromium.org> Date: Mon Oct 23 22:22:22 2017
,
Oct 24 2017
I changed the kptr_restrict setting in arc_setup from 2 to 1, to unblock our pipeline, which landed in 10062.0.0. I agree with Mike's comment that this setting shouldn't be done in a component init at all, but I don't know who needs to tackle that one. Do you want to open a separate issue for it?
,
Oct 24 2017
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/overlays/project-cheets-private/+/fca8e3fcc501855b98bad309558e99683ce6b177 commit fca8e3fcc501855b98bad309558e99683ce6b177 Author: Luis Hector Chavez <lhchavez@google.com> Date: Tue Oct 24 22:30:13 2017
,
Oct 24 2017
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/overlays/project-cheets-private/+/5bc81bb9fdafb5d9436b40570a019447fd13395d commit 5bc81bb9fdafb5d9436b40570a019447fd13395d Author: Luis Hector Chavez <lhchavez@google.com> Date: Tue Oct 24 22:30:12 2017
,
Oct 25 2017
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/cheets-scripts/+/351d46580f16f0dee4d7cccec5c7b322dfffad7a commit 351d46580f16f0dee4d7cccec5c7b322dfffad7a Author: Mike Frysinger <vapier@chromium.org> Date: Wed Oct 25 17:24:09 2017
,
Oct 26
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 26
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by gmx@chromium.org
, Oct 20 2017