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] Fix slow and non-deterministic behavior of isspace() and tolower()


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


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