New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 797835 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Update perf to be built with clang

Project Member Reported by manojgupta@chromium.org, Dec 28 2017

Issue description

Current version of perf 4.4 in ChromeOS can't be built with clang.

Since upstream kernel (4.14?) can now be built with clang, it is probably a good idea to upgrade to a newer version of perf and check if it can be compiled with clang. 
 

Comment 1 by mka@chromium.org, Jan 16 2018

I created a series of CLs for a perf v4.14 ebuild:

https://chromium-review.googlesource.com/#/c/chromiumos/overlays/chromiumos-overlay/+/860908/

perf itself seems to be working, however the pre-cq fails due to a tool (quibber/perf_data_converter) not understanding some new event types. The owners of the tool are working on adding support for the new types (or to at least ignore them).
Components: Tools>ChromeOS-Toolchain
Cc: lakshm...@chromium.org
Matthias, The errors in ImageTest are related to the perf upgrade where the attr.py file is using an incorrect python (in shebang?)

https://luci-logdog.appspot.com/v/?s=chromeos/bb/chromiumos.tryserver/no_vmtest_pre_cq/245146/+/recipes/steps/ImageTest/0/stdout

  File "/mnt/host/source/chromite/cros/test/image_test.py", line 164, in TestValidInterpreter
    self.assertFalse(failures, '\n'.join(failures))
AssertionError: File dir-ROOT-A/usr/libexec/perf-core/tests/attr.py uses non-existing interpreter dir-ROOT-A/usr/local/bin/python2.7.

Comment 4 by vapier@chromium.org, Mar 21 2018

we don't want any python files installed in the rootfs by default.  it might be the new perf build code doesn't respect the NO_LIBPYTHON knob correctly.

Comment 5 by mka@chromium.org, Mar 21 2018

Recent perf versions by default install a bunch of self tests, which include the python script:

https://elixir.bootlin.com/linux/v4.15.12/source/tools/perf/Makefile.perf#L808

I think we are not overly interested in having the self tests in the rootfs (at least not by default), so we probably want to skip their installation.

Comment 6 by vapier@chromium.org, Mar 21 2018

yeah, if they're only self tests, we should just delete them all regardless of the build settings
Project Member

Comment 7 by bugdroid1@chromium.org, Mar 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/df9fc05147a787bc58ee1c2a28b179329de130b5

commit df9fc05147a787bc58ee1c2a28b179329de130b5
Author: Matthias Kaehlcke <mka@chromium.org>
Date: Sat Mar 24 19:31:27 2018

perf: Add v4.14 base ebuild

The ebuild is a copy of gentoo's v4.9.13 and is not useful as is. We use
it as base version for v4.14 and adapt it to CrOS and v4.14 in a separate
CL, which makes it easier to track the delta.

BUG= chromium:797835 
TEST=none
CQ-DEPEND=CL:860908

Change-Id: I8646862c41b90737f4f5e46a5f60b1ec2a9bf8b2
Reviewed-on: https://chromium-review.googlesource.com/860907
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[add] https://crrev.com/df9fc05147a787bc58ee1c2a28b179329de130b5/dev-util/perf/perf-4.14.ebuild
[modify] https://crrev.com/df9fc05147a787bc58ee1c2a28b179329de130b5/dev-util/perf/Manifest

Project Member

Comment 8 by bugdroid1@chromium.org, Mar 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/7a8385fb15a0440629a13c49d1f0c338bcbcadf2

commit 7a8385fb15a0440629a13c49d1f0c338bcbcadf2
Author: Matthias Kaehlcke <mka@chromium.org>
Date: Sat Mar 24 19:31:28 2018

perf: v4.14: CrOSify and adapt to the actual version

The current v4.14 ebuild is a copy of gentoo's ebuild for perf v4.9.13,
adapt it to CrOS and v4.14.

As of now perf v4.14 is always built with v4.4 kernel headers. If
features are needed that are only available in newer kernels the
dependency can be adapted after creating the corresponding
linux-headers ebuild.

BUG= chromium:797835 
TEST=emerge-kevin/pyro/veyron_minnie perf
  verify v4.14 is built
  cros deploy ${DUT} perf
  run 'perf test'
    => no regressions wrt v4.4

Change-Id: Ib551c9d924d21e519460c80ffbd37ba84ba0d616
Reviewed-on: https://chromium-review.googlesource.com/860908
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[add] https://crrev.com/7a8385fb15a0440629a13c49d1f0c338bcbcadf2/dev-util/perf/perf-4.14-r1.ebuild
[add] https://crrev.com/7a8385fb15a0440629a13c49d1f0c338bcbcadf2/dev-util/perf/files/4.14-Don-t-install-self-tests.patch
[add] https://crrev.com/7a8385fb15a0440629a13c49d1f0c338bcbcadf2/dev-util/perf/files/4.14-Fix-hugepage-text.patch
[modify] https://crrev.com/7a8385fb15a0440629a13c49d1f0c338bcbcadf2/dev-util/perf/perf-4.14.ebuild

Project Member

Comment 10 by bugdroid1@chromium.org, Mar 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/3de1941049849405b84ceefd53fbc46f062a1d3a

commit 3de1941049849405b84ceefd53fbc46f062a1d3a
Author: Manoj Gupta <manojgupta@google.com>
Date: Sun Mar 25 22:36:24 2018

perf: Stop forced build with GCC.

perf 4.14 can be built with clang. So stop forced build with gcc.

BUG= chromium:797835 
TEST=perf builds.

Change-Id: I160134583ac0dbedcceed4aeac204de2156820d4
Reviewed-on: https://chromium-review.googlesource.com/979592
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[rename] https://crrev.com/3de1941049849405b84ceefd53fbc46f062a1d3a/dev-util/perf/perf-4.14-r2.ebuild
[modify] https://crrev.com/3de1941049849405b84ceefd53fbc46f062a1d3a/chromeos/config/env/dev-util/perf

Comment 11 by mka@chromium.org, Mar 28 2018

Status: Fixed (was: Untriaged)
Project Member

Comment 12 by bugdroid1@chromium.org, May 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/f5e2476f567b380b9c846c5ae107a0877ecb4ba7

commit f5e2476f567b380b9c846c5ae107a0877ecb4ba7
Author: Dmitry Torokhov <dtor@chromium.org>
Date: Wed May 23 01:45:44 2018

platform_ToolchainOptions: drop perf binaries from libgcc whitelist

perf/trace are no longer compiled with gcc, so we can drop them off the
whitelist.

BUG= chromium:797835 
TEST=Run test on Eve

Change-Id: I6562b581d8b86c98de3b62c8a7a001343a17e72a
Reviewed-on: https://chromium-review.googlesource.com/1067497
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/f5e2476f567b380b9c846c5ae107a0877ecb4ba7/client/site_tests/platform_ToolchainOptions/libgcc_whitelist

Sign in to add a comment