public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/55488] New: Implement cold calls in tsan run-time
@ 2012-11-27 13:59 konstantin.s.serebryany at gmail dot com
2013-01-10 17:58 ` [Bug sanitizer/55488] " wmi at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: konstantin.s.serebryany at gmail dot com @ 2012-11-27 13:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55488
Bug #: 55488
Summary: Implement cold calls in tsan run-time
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: sanitizer
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: konstantin.s.serebryany@gmail.com
CC: dodji@gcc.gnu.org, dvyukov@gcc.gnu.org,
jakub@gcc.gnu.org, kcc@gcc.gnu.org, wmi@gcc.gnu.org
The hottest functions in tsan run-time make two cold calls: __tsan_report_race
and __tsan_trace_switch
If these calls are implemented via regular calling convention,
they ruin the performance since the compiler creates too many spills.
So, we've manually implemented a cold-call calling convention using a separate
assembly file, libsanitizer/tsan/tsan_rtl_amd64.S
Currently, this hack is disabled in GCC causing the tsan run-time to be slower
than it could be:
libsanitizer/tsan/tsan_rtl.h:
#if 0 && TSAN_DEBUG == 0
...
#define HACKY_CALL(f) \
We need to enable building/linking the file libsanitizer/tsan/tsan_rtl_amd64.S
and enable the HACKY_CALL in libsanitizer/tsan/tsan_rtl.h. This will eliminate
the only difference left between the gcc version and upstream.
Or maybe gcc has another way to implement a cold call?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug sanitizer/55488] Implement cold calls in tsan run-time
2012-11-27 13:59 [Bug sanitizer/55488] New: Implement cold calls in tsan run-time konstantin.s.serebryany at gmail dot com
@ 2013-01-10 17:58 ` wmi at gcc dot gnu.org
2013-01-11 19:53 ` dvyukov at google dot com
2013-01-14 13:20 ` kcc at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: wmi at gcc dot gnu.org @ 2013-01-10 17:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55488
--- Comment #1 from wmi at gcc dot gnu.org 2013-01-10 17:57:40 UTC ---
Author: wmi
Date: Thu Jan 10 17:57:34 2013
New Revision: 195092
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195092
Log:
2013-01-10 Wei Mi <wmi@google.com>
libsanitizer/
PR sanitizer/55488
* tsan/Makefile.am: Add tsan_rtl_amd64.S.
* tsan/Makefile.in: Regenerated.
* tsan/tsan_rtl.h: Enable HACKY_CALL.
Modified:
trunk/libsanitizer/ChangeLog
trunk/libsanitizer/tsan/Makefile.am
trunk/libsanitizer/tsan/Makefile.in
trunk/libsanitizer/tsan/tsan_rtl.h
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug sanitizer/55488] Implement cold calls in tsan run-time
2012-11-27 13:59 [Bug sanitizer/55488] New: Implement cold calls in tsan run-time konstantin.s.serebryany at gmail dot com
2013-01-10 17:58 ` [Bug sanitizer/55488] " wmi at gcc dot gnu.org
@ 2013-01-11 19:53 ` dvyukov at google dot com
2013-01-14 13:20 ` kcc at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: dvyukov at google dot com @ 2013-01-11 19:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55488
Dmitry Vyukov <dvyukov at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dvyukov at google dot com
--- Comment #2 from Dmitry Vyukov <dvyukov at google dot com> 2013-01-11 19:52:55 UTC ---
Great, thanks!
I guess we need to close this bug now.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug sanitizer/55488] Implement cold calls in tsan run-time
2012-11-27 13:59 [Bug sanitizer/55488] New: Implement cold calls in tsan run-time konstantin.s.serebryany at gmail dot com
2013-01-10 17:58 ` [Bug sanitizer/55488] " wmi at gcc dot gnu.org
2013-01-11 19:53 ` dvyukov at google dot com
@ 2013-01-14 13:20 ` kcc at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: kcc at gcc dot gnu.org @ 2013-01-14 13:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55488
Kostya Serebryany <kcc at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #3 from Kostya Serebryany <kcc at gcc dot gnu.org> 2013-01-14 13:20:01 UTC ---
thanks! I confirmed the fix.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-14 13:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-27 13:59 [Bug sanitizer/55488] New: Implement cold calls in tsan run-time konstantin.s.serebryany at gmail dot com
2013-01-10 17:58 ` [Bug sanitizer/55488] " wmi at gcc dot gnu.org
2013-01-11 19:53 ` dvyukov at google dot com
2013-01-14 13:20 ` kcc at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).