[PATCH] Fix slow and non-deterministic behavior of isspace() and tolower()
John Baldwin
jhb@FreeBSD.org
Mon Jun 10 21:14:00 GMT 2019
On 6/9/19 8:17 AM, Shawn Landden wrote:
> I was getting 8% and 6% cpu usage in tolower() and isspace(),
> respectively, waiting for a breakpoint on ppc64el.
>
> Also, gdb doesn't want non-deterministic behavior here.
These routines are not always macros. For example, FreeBSD's ctype.h
exposes these as functions for C++ and only as macros for pure C.
Perhaps it would be better to define custom functions that don't use
the POSIX names to avoid clashing with whatever libc provides if we
want something with very specific behavior.
--
John Baldwin
More information about the Gdb-patches
mailing list