Commit Graph

4 Commits

Author SHA1 Message Date
Willy Tarreau e0b3a8b5a2 BUILD: halog: fix some incorrect signs in printf formats for integers
In issue #1184, cppcheck found several issues in the printf formats
used to display integers, some of which are unsigned but which used to
still rely on "%d".
2022-04-12 08:40:38 +02:00
Willy Tarreau 80d3daad50 BUILD: halog: fix a -Wundef warning on non-glibc systems
Dmitry reported this warning on FreeBSD since the introduction of -Wundef:

  admin/halog/fgets2.c:38:30: warning: '__GLIBC__' is not defined, evaluates to 0 [-Wundef]
  #if defined(__x86_64__) &&  (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 15))
                               ^
A defined() was missing.
2021-09-13 09:32:01 +02:00
Willy Tarreau c4710e14fe ADMIN: halog: automatically enable USE_MEMCHR on the right glibc version
There has been a USE_MEMCHR option for ages that was mostly never enabled
because it was unclear when glibc became faster. A quick look at the code
indicates that this arrived with the SSE implementation of memchr() which
arrived at commit 093ecf92998de2 between 2.14 and 2.15, so let's automatically
turn this on on x86_64 with glibc >= 2.15.

This results in ~6GB of logs read per second (20 million lines) and ~2.5GB/s
(8 million lines) parsed for errors or status codes classification, or 1 GB/s
(3 million lines) for time percentiles.
2021-04-02 17:48:42 +02:00
Willy Tarreau d798889a5d CONTRIB: move halog to admin/
halog is an admin tool, so let's move it to admin/ as well. The makefile
was updated to build from the new directory.
2021-04-02 17:48:42 +02:00