This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/9] Add UBSan to the build


On 08/29/2018 01:44 AM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
> 
> Pedro> I think this is a good idea.  On enabling this by default on devel
> Pedro> builds, do you have a sense of CPU/memory overhead this introduces?
> 
> I have no idea about the CPU.  It doesn't seem notably slower to me but
> I am not sure I would really notice.

Here:

  https://developer.apple.com/documentation/code_diagnostics/undefined_behavior_sanitizer

it says:

 "
 Performance Impact

 The performance impact of the Undefined Behavior Sanitizer is minimal, with
 with an average 20% CPU overhead in the Debug configuration.
 "

20% seems quite a bit.   Might be noticeable in "make check" time.
If you're doing performance analysis, say, running "make check-perf", or running
some use case under "perf", sounds like you'll need to be sure to
disable UBSan.  I also mildly worry about random people comparing the
performance of master GDB or some ftp snapshot against previous GDB versions
or against other debuggers and being mislead.  If that slowdown is true, I think we
should at least document it somewhere more prominently, as I think that so
far release vs development mode didn't have much of an impact?

Kind of like how GCC documents --enable-checking, at
<https://gcc.gnu.org/install/configure.html>:

"When you specify this option, the compiler is built to perform internal consistency
checks of the requested complexity. This does not change the generated code, but adds
error checking within the compiler. This will slow down the compiler and may only work
properly if you are building the compiler with GCC. This is ‘yes,extra’ by default when
building from SVN or snapshots, but ‘release’ for releases."

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]