* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
@ 2014-11-18 8:20 ` trippels at gcc dot gnu.org
2014-11-18 11:51 ` pinskia at gcc dot gnu.org
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-11-18 8:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
The numbers above are seconds.
Perf shows:
29.44% a.out libgcc_s.so.1 [.] uw_update_context_1
13.08% a.out libasan.so.2.0.0 [.] __sanitizer::mem_is_zero(char const*,
unsigned long)
11.40% a.out libgcc_s.so.1 [.] execute_cfa_program
5.61% a.out libpthread-2.18.so [.] pthread_mutex_unlock
5.26% a.out libc-2.18.so [.] memcpy
4.90% a.out libgcc_s.so.1 [.] _Unwind_IteratePhdrCallback
4.07% a.out libasan.so.2.0.0 [.] __asan_region_is_poisoned
3.33% a.out libpthread-2.18.so [.] pthread_mutex_lock
2.51% a.out libgcc_s.so.1 [.] uw_frame_state_for
2.36% a.out libc-2.18.so [.] memset
1.53% a.out libasan.so.2.0.0 [.] __interceptor_strlen
1.51% a.out libgcc_s.so.1 [.] read_encoded_value_with_base
1.38% a.out libasan.so.2.0.0 [.] __asan_memcpy
0.95% a.out libasan.so.2.0.0 [.] __asan_memset
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
2014-11-18 8:20 ` [Bug sanitizer/63927] " trippels at gcc dot gnu.org
@ 2014-11-18 11:51 ` pinskia at gcc dot gnu.org
2014-11-18 11:56 ` jakub at gcc dot gnu.org
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-11-18 11:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
PowerPC is the only target with an abi that can backtrace correctly without a
frame pointer so it should be easy to implement that.
Even x86 is broken backtracking without a frame pointer.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
2014-11-18 8:20 ` [Bug sanitizer/63927] " trippels at gcc dot gnu.org
2014-11-18 11:51 ` pinskia at gcc dot gnu.org
@ 2014-11-18 11:56 ` jakub at gcc dot gnu.org
2014-11-18 18:22 ` kcc at gcc dot gnu.org
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-11-18 11:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Right, but it is a library change, so somebody has to code it up, test and push
upstream first, then we can cherry-pick it.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
` (2 preceding siblings ...)
2014-11-18 11:56 ` jakub at gcc dot gnu.org
@ 2014-11-18 18:22 ` kcc at gcc dot gnu.org
2014-11-18 18:25 ` pinskia at gcc dot gnu.org
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: kcc at gcc dot gnu.org @ 2014-11-18 18:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
--- Comment #4 from Kostya Serebryany <kcc at gcc dot gnu.org> ---
Why can't we use frame pointers on PPC?
So far I have not seen any implementation of unwinder not based on FPs
that was fast enough for ASan.
ASan unwinds the stack on every malloc/free and thus it is very sensitive to
the unwinder performance.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
` (3 preceding siblings ...)
2014-11-18 18:22 ` kcc at gcc dot gnu.org
@ 2014-11-18 18:25 ` pinskia at gcc dot gnu.org
2014-11-18 18:38 ` trippels at gcc dot gnu.org
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-11-18 18:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Kostya Serebryany from comment #4)
> Why can't we use frame pointers on PPC?
You don't need to use the frame pointer. The ABI says the stack frame always
contains a reference to the previous frame at a specific location (I think
sp+0).
> So far I have not seen any implementation of unwinder not based on FPs
> that was fast enough for ASan.
> ASan unwinds the stack on every malloc/free and thus it is very sensitive to
> the unwinder performance.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
` (4 preceding siblings ...)
2014-11-18 18:25 ` pinskia at gcc dot gnu.org
@ 2014-11-18 18:38 ` trippels at gcc dot gnu.org
2014-11-18 19:04 ` kcc at gcc dot gnu.org
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-11-18 18:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
See: http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi-1.9.html#STACK
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
` (5 preceding siblings ...)
2014-11-18 18:38 ` trippels at gcc dot gnu.org
@ 2014-11-18 19:04 ` kcc at gcc dot gnu.org
2015-07-28 13:33 ` wschmidt at gcc dot gnu.org
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: kcc at gcc dot gnu.org @ 2014-11-18 19:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
Kostya Serebryany <kcc at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |eugeni.stepanov at gmail dot com,
| |samsonov at google dot com
--- Comment #7 from Kostya Serebryany <kcc at gcc dot gnu.org> ---
(In reply to Markus Trippelsdorf from comment #6)
> See:
> http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi-1.9.html#STACK
Then someone needs to implement the appropriate unwinder
in sanitizer_common/sanitizer_stacktrace.cc
and submit the patch for review upstream.
https://code.google.com/p/address-sanitizer/wiki/HowToContribute
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
` (6 preceding siblings ...)
2014-11-18 19:04 ` kcc at gcc dot gnu.org
@ 2015-07-28 13:33 ` wschmidt at gcc dot gnu.org
2015-07-28 14:28 ` trippels at gcc dot gnu.org
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2015-07-28 13:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
Bill Schmidt <wschmidt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-07-28
Ever confirmed|0 |1
--- Comment #8 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
Patch submitted as http://reviews.llvm.org/D11552.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
` (7 preceding siblings ...)
2015-07-28 13:33 ` wschmidt at gcc dot gnu.org
@ 2015-07-28 14:28 ` trippels at gcc dot gnu.org
2015-07-28 19:45 ` wschmidt at gcc dot gnu.org
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-28 14:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
--- Comment #9 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Bill Schmidt from comment #8)
> Patch submitted as http://reviews.llvm.org/D11552.
Wow. Very nice speedup for such a simple patch.
Would be great if could be cherry-picked directly.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
` (8 preceding siblings ...)
2015-07-28 14:28 ` trippels at gcc dot gnu.org
@ 2015-07-28 19:45 ` wschmidt at gcc dot gnu.org
2015-07-28 20:11 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2015-07-28 19:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
--- Comment #10 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
The fix was accepted and committed upstream in the LLVM compiler-rt project.
Jakub, is applying this patch to GCC's libsanitizer ok?
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
` (9 preceding siblings ...)
2015-07-28 19:45 ` wschmidt at gcc dot gnu.org
@ 2015-07-28 20:11 ` jakub at gcc dot gnu.org
2015-07-29 3:34 ` wschmidt at gcc dot gnu.org
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-07-28 20:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Bill Schmidt from comment #10)
> The fix was accepted and committed upstream in the LLVM compiler-rt project.
> Jakub, is applying this patch to GCC's libsanitizer ok?
After proper testing it is preapproved, provided you write ChangeLog entry for
it.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
` (10 preceding siblings ...)
2015-07-28 20:11 ` jakub at gcc dot gnu.org
@ 2015-07-29 3:34 ` wschmidt at gcc dot gnu.org
2015-07-29 6:22 ` trippels at gcc dot gnu.org
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2015-07-29 3:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
Bill Schmidt <wschmidt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #13 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
Work is complete.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
` (11 preceding siblings ...)
2015-07-29 3:34 ` wschmidt at gcc dot gnu.org
@ 2015-07-29 6:22 ` trippels at gcc dot gnu.org
2015-07-29 6:32 ` trippels at gcc dot gnu.org
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-29 6:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #14 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Sorry but the libsanitizer/sanitizer_common/sanitizer_stacktrace.h hunk is
missing
from your committed patch.
So SANITIZER_CAN_FAST_UNWIND is still 0 and the new code in
sanitizer_stacktrace.c isn't used at all.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
` (12 preceding siblings ...)
2015-07-29 6:22 ` trippels at gcc dot gnu.org
@ 2015-07-29 6:32 ` trippels at gcc dot gnu.org
2015-07-29 6:33 ` trippels at gcc dot gnu.org
2015-07-29 11:26 ` wschmidt at gcc dot gnu.org
15 siblings, 0 replies; 17+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-29 6:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
--- Comment #15 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Author: trippels
Date: Wed Jul 29 06:32:09 2015
New Revision: 226338
URL: https://gcc.gnu.org/viewcvs?rev=226338&root=gcc&view=rev
Log:
Use fast unwinder for PowerPC
2015-07-29 Markus Trippelsdorf <markus@trippelsdorf.de>
PR sanitizer/63927
* sanitizer_common/sanitizer_stacktrace.h: Use fast unwinder
for PowerPC.
Modified:
trunk/libsanitizer/ChangeLog
trunk/libsanitizer/sanitizer_common/sanitizer_stacktrace.h
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
` (13 preceding siblings ...)
2015-07-29 6:32 ` trippels at gcc dot gnu.org
@ 2015-07-29 6:33 ` trippels at gcc dot gnu.org
2015-07-29 11:26 ` wschmidt at gcc dot gnu.org
15 siblings, 0 replies; 17+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-29 6:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED
--- Comment #16 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Fixed as obvious.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug sanitizer/63927] AddressSanitizer painfully slow on ppc64
2014-11-18 8:02 [Bug sanitizer/63927] New: AddressSanitizer painfully slow on ppc64 trippels at gcc dot gnu.org
` (14 preceding siblings ...)
2015-07-29 6:33 ` trippels at gcc dot gnu.org
@ 2015-07-29 11:26 ` wschmidt at gcc dot gnu.org
15 siblings, 0 replies; 17+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2015-07-29 11:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63927
--- Comment #17 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
Argh, sorry, Markus. Thanks for fixing it up.
^ permalink raw reply [flat|nested] 17+ messages in thread