New issue
Advanced search Search tips

Issue 693137 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Sep 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Remove fno-omit-frame-pointer

Project Member Reported by manojgupta@chromium.org, Feb 16 2017

Issue description

Currently, compiler wrapper appends fno-omit-frame-pointer so that stack traces can be obtained.
However, stack traces are already broken on arm. x86 (Haswell and later) has another way of getting stack traces (LBR callstacks) for kernel versions >= 3.18 and 4.4.
 
Cc: llozano@chromium.org
Had a chat with gmx@ looked at getting stack traces with perf.
However, the conclusion is its not possible to get stack traces with thumb mode.

Reason is arm mode use r11 as frame pointer while thumb mode can only access r0-r7 (3 bits for r#) and uses r7 as frame pointer. Because of this inconsistency and the fact that fp is callee saved, stack traces do not work with arm-thumb mixed code in Perf.
Update: Plan to land this sometime soon for ARM32 after moving to a newer llvm version. 
Status: Started (was: Untriaged)
Will add this to toolchain team daily testing.
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 16 2017

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

commit 84fb3dc584d61fa188513188bf92a711939abfd4
Author: Manoj Gupta <manojgupta@google.com>
Date: Fri Sep 15 23:59:23 2017

sysroot_wrapper: Do not force frame pointers on ARM32.

CWP needs frame pointers to be able to get statck traces with profile.
However, stack traces are broken on ARM32. Therefore, drop forcing
frame pointers on ARM32.
Chrome is already built without frame pointers on ARM32 so the impact
of this CL is extremely limited.

BUG= chromium:693137 
TEST=Daily toolchain team testing.

Change-Id: Ie7c0c994340e54d5586be4f53ec52d3c654b0d75
Reviewed-on: https://chromium-review.googlesource.com/452727
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Ting-Yuan Huang <laszio@chromium.org>

[modify] https://crrev.com/84fb3dc584d61fa188513188bf92a711939abfd4/sys-devel/gcc/files/sysroot_wrapper.hardened.body
[rename] https://crrev.com/84fb3dc584d61fa188513188bf92a711939abfd4/sys-devel/gcc/gcc-4.9.2-r164.ebuild

Status: Verified (was: Started)
Removed from ARM32. Other archs till need it.

Sign in to add a comment