Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(823)

Issue 9416068: linux: don't instrument mmx functions (Closed)

Created:
8 years, 10 months ago by Evan Martin
Modified:
8 years, 9 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

linux: don't instrument mmx functions Shadow stacks use -finstrument-functions to hook all function entry/exit. But mmx-related functions expect to be inlined so the compiler can compile them out into mmx instructions. This change excludes the mmx intrinsics header file from instrumentation. Without it, builds wil fail with errors like the following: ../../third_party/gold/gold64: obj/media/libyuv_convert.a(obj/media/base/yuv_convert.yuv_convert.o): in function media::EmptyRegisterState():yuv_convert.cc(.text._ZN5media18EmptyRegisterStateEv+0x29): error: undefined reference to '_mm_empty()' (_mm_empty() is an mmx intrinsic function.) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=123289

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -1 line) Patch
M build/common.gypi View 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 15 (0 generated)
Evan Martin
glider: review others: FYI
8 years, 10 months ago (2012-02-21 20:10:25 UTC) #1
Alexander Potapenko
LGTM
8 years, 10 months ago (2012-02-22 11:50:33 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/evan@chromium.org/9416068/1
8 years, 10 months ago (2012-02-22 23:42:16 UTC) #3
commit-bot: I haz the power
Try job failure for 9416068-1 (retry) on win_rel for step "ui_tests". It's a second try, ...
8 years, 10 months ago (2012-02-23 02:57:40 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/evan@chromium.org/9416068/1
8 years, 10 months ago (2012-02-23 03:36:20 UTC) #5
commit-bot: I haz the power
Try job failure for 9416068-1 (retry) (retry) on win_rel for step "ui_tests". It's a second ...
8 years, 10 months ago (2012-02-23 07:31:56 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/evan@chromium.org/9416068/1
8 years, 10 months ago (2012-02-23 17:22:38 UTC) #7
commit-bot: I haz the power
Change committed as 123289
8 years, 10 months ago (2012-02-23 19:10:53 UTC) #8
Ami GONE FROM CHROMIUM
Under clang this change emits this line for every .o built: clang: warning: argument unused ...
8 years, 9 months ago (2012-03-26 18:24:11 UTC) #9
Evan Martin
On 2012/03/26 18:24:11, Ami Fischman wrote: > Under clang this change emits this line for ...
8 years, 9 months ago (2012-03-26 18:27:58 UTC) #10
Ami GONE FROM CHROMIUM
> > SGTM. But every time we diverge gcc and clang the build gets a ...
8 years, 9 months ago (2012-03-26 18:38:19 UTC) #11
Evan Martin
On 2012/03/26 18:38:19, Ami Fischman wrote: > You and me both. I just added the ...
8 years, 9 months ago (2012-03-26 18:58:15 UTC) #12
Ami GONE FROM CHROMIUM
> > FWIW, having spent some time looking into profiling, I conclude that it'd > ...
8 years, 9 months ago (2012-03-26 20:04:35 UTC) #13
Evan Martin
On Mon, Mar 26, 2012 at 1:04 PM, Ami Fischman <fischman@chromium.org> wrote: >> FWIW, having ...
8 years, 9 months ago (2012-03-26 20:30:51 UTC) #14
Alexander Potapenko
8 years, 9 months ago (2012-03-27 11:32:01 UTC) #15
Most of the time we have the opposite problem: the system libraries are built
without frame pointers, so the stacks are often broken:
http://code.google.com/p/chromium/issues/detail?id=51988

IIRC libunwind does not work with tcmalloc out of the box because of a subtle
deadlock in dl_iterate_phdr which might be triggered while unwinding.

I think I've tried to combine the data from frame pointers and the shadow stack,
but considered it not worth the effort. The slowdown brought by the shadow
stacks is not that big, and we anyway use them only for leak checking, where the
guts of the third party libraries may not be very interesting.

OTOH the shadow stacks have some impact on the CPU profile, so it's better to
avoid using them with the tcmalloc profiler.

Powered by Google App Engine
This is Rietveld 408576698