SanitizerCoverage support

2021-01-19 Thread Roger Phillips via Gcc
Greetings, can you tell me if support of SanitizerCoverage is planned for gcc in the foreseeable future? Regards

Re: SanitizerCoverage support

2021-01-19 Thread Martin Liška
On 1/19/21 10:07 AM, Roger Phillips via Gcc wrote: Greetings, can you tell me if support of SanitizerCoverage is planned for gcc in the foreseeable future? Regards Hello. We do support it, please see 'man gcc': -fsanitize-coverage=trace-pc -fsanitize-coverage=trace-cmp Martin

Re: SanitizerCoverage support

2021-01-19 Thread Roger Phillips via Gcc
Excellent! Since which version is this available? From: Martin Liška Sent: Tuesday, January 19, 2021 10:23 AM To: Roger Phillips ; gcc@gcc.gnu.org Subject: Re: SanitizerCoverage support On 1/19/21 10:07 AM, Roger Phillips via Gcc wrote: > Greetings, > > can you

Re: SanitizerCoverage support

2021-01-19 Thread Martin Liška
On 1/19/21 11:33 AM, Roger Phillips wrote: Excellent! Since which version is this available? Hello. The option -fsanitize-coverage=trace-pc is available since 6.1.0 and -fsanitize-coverage=trace-cmp since 8.1.0. Martin ---

Re: SanitizerCoverage support

2021-01-19 Thread Roger Phillips via Gcc
Oh btw: Does any of these two modes allow me to generate sancov files on function level? My intent is to record program flow, then visualize the diff between the runs. Most examples I see use edge,bb,func modes so I'm not sure trace-pc and trace-pc-cmp are enough. _

Should GCC provide __builtin_memcpy_inline like clang does?

2021-01-19 Thread unlvsur unlvsur via Gcc
I think __builtin_memmove_inline, __builtin_memset_inline can also get provided. That allows better performance for small size copies and allowing memcpy to be usable without libc. Sent from Mail for Windows 10

Re: SanitizerCoverage support

2021-01-19 Thread Roger Phillips via Gcc
I tried -fsanitize-coverage=trace-pc with g++ 7.5.0 on a X64 Ubuntu system. The linker complained that a function __sanitizer_cov_trace_pc was undefined. So I added it in my program like this: extern "C" void __sanitizer_cov_trace_pc() { printf("Address: %p\n", __builtin_return_address(0)); }

Re: Should GCC provide __builtin_memcpy_inline like clang does?

2021-01-19 Thread Segher Boessenkool
On Tue, Jan 19, 2021 at 11:33:56AM +, unlvsur unlvsur via Gcc-help wrote: > I think __builtin_memmove_inline, __builtin_memset_inline can also get > provided. > > That allows better performance for small size copies You normally will get better performance by letting the compiler figure out

RE: Should GCC provide __builtin_memcpy_inline like clang does?

2021-01-19 Thread unlvsur unlvsur via Gcc
That is not for inline. That is to allow implementing memcpy without introducing any libc runtime which allows us to use it in freestanding environment. Sent from Mail for Windows 10 From: Segher Boessenkool Sent

Re: Should GCC provide __builtin_memcpy_inline like clang does?

2021-01-19 Thread Gabriel Ravier via Gcc
On 1/19/21 12:33 PM, unlvsur unlvsur via Gcc wrote: I think __builtin_memmove_inline, __builtin_memset_inline can also get provided. That allows better performance for small size copies Manual tweaking like that seems a bit ridiculous except in very narrow situations, and just letting GCC as

Re: Should GCC provide __builtin_memcpy_inline like clang does?

2021-01-19 Thread H.J. Lu via Gcc
On Tue, Jan 19, 2021 at 6:44 PM Gabriel Ravier via Gcc wrote: > > On 1/19/21 12:33 PM, unlvsur unlvsur via Gcc wrote: > > I think __builtin_memmove_inline, __builtin_memset_inline can also get > > provided. > > > > That allows better performance for small size copies > > Manual tweaking like that

Re: Should GCC provide __builtin_memcpy_inline like clang does?

2021-01-19 Thread Richard Biener via Gcc
On Tue, Jan 19, 2021 at 9:04 PM unlvsur unlvsur via Gcc wrote: > > That is not for inline. That is to allow implementing memcpy without > introducing any libc runtime which allows us to use it in freestanding > environment. Note that GCC requires memcpy, memmove, memset and memcmp to exist even