2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-22 10:10:06 +00:00

85 Commits

Author SHA1 Message Date
Ondřej Surý
e603983ec9 Stop providing branch prediction information
The __builtin_expect() can be used to provide the compiler with branch
prediction information.  The Gcc manual says[1] on the subject:

    In general, you should prefer to use actual profile feedback for
    this (-fprofile-arcs), as programmers are notoriously bad at
    predicting how their programs actually perform.

Stop using __builtin_expect() and ISC_LIKELY() and ISC_UNLIKELY() macros
to provide the branch prediction information as the performance testing
shows that named performs better when the __builtin_expect() is not
being used.

1. https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fexpect
2021-10-14 10:33:24 +02:00
Ondřej Surý
2e3a2eecfe Make isc_result a static enum
Remove the dynamic registration of result codes.  Convert isc_result_t
from unsigned + #defines into 32-bit enum type in grand unified
<isc/result.h> header.  Keep the existing values of the result codes
even at the expense of the description and identifier tables being
unnecessary large.

Additionally, add couple of:

    switch (result) {
    [...]
    default:
        break;
    }

statements where compiler now complains about missing enum values in the
switch statement.
2021-10-06 11:22:20 +02:00
Evan Hunt
dcee985b7f update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
Evan Hunt
68a1c9d679 change 'expr == true' to 'expr' in conditionals 2020-05-25 16:09:57 -07:00
Witold Kręcicki
3a3b5f557a Add an arena to compressctx 2020-02-26 07:57:44 +00:00
Evan Hunt
e851ed0bb5 apply the modified style 2020-02-13 15:05:06 -08:00
Ondřej Surý
056e133c4c Use clang-tidy to add curly braces around one-line statements
The command used to reformat the files in this commit was:

./util/run-clang-tidy \
	-clang-tidy-binary clang-tidy-11
	-clang-apply-replacements-binary clang-apply-replacements-11 \
	-checks=-*,readability-braces-around-statements \
	-j 9 \
	-fix \
	-format \
	-style=file \
	-quiet
clang-format -i --style=format $(git ls-files '*.c' '*.h')
uncrustify -c .uncrustify.cfg --replace --no-backup $(git ls-files '*.c' '*.h')
clang-format -i --style=format $(git ls-files '*.c' '*.h')
2020-02-13 22:07:21 +01:00
Ondřej Surý
f50b1e0685 Use clang-format to reformat the source files 2020-02-12 15:04:17 +01:00
Ondřej Surý
ae83801e2b Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
Ondřej Surý
78d0cb0a7d Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
Ondřej Surý
7351c505a0 Remove duplicate config.h 2018-08-08 09:37:30 +02:00
Ondřej Surý
994e656977 Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
Ondřej Surý
cb6a185c69 Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
Ondřej Surý
7ee8a7e69f address win32 build issues
- Replace external -DOPENSSL/-DPKCS11CRYPTO with properly AC_DEFINEd
  HAVE_OPENSSL/HAVE_PKCS11
- Don't enforce the crypto provider from platform.h, just from dst_api.c
  and configure scripts
2018-05-22 16:32:21 -07:00
Ondřej Surý
843d389661 Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
Mark Andrews
6adc40b3ce 4704. [cleanup] Silence Visual Studio compiler warnings. [RT #45898] 2017-09-07 12:57:55 +10:00
Evan Hunt
8b8c2650b8 [master] change 'index' to avoid shadowed variable warning 2017-05-03 12:36:54 -07:00
Tinderbox User
1f6505a424 update copyright notice / whitespace 2017-04-22 23:45:41 +00:00
Mukund Sivaraman
03be5a6b4e Improve performance for delegation heavy answers and also general query performance (#44029) 2017-04-22 09:22:44 +05:30
Mark Andrews
0c27b3fe77 4401. [misc] Change LICENSE to MPL 2.0. 2016-06-27 14:56:38 +10:00
Mukund Sivaraman
27bc16fcdc Lazily initialize dns_compress->table only when compression is enabled (#41189) 2015-12-07 12:48:57 +05:30
Witold Krecicki
bfd4b9e11a 4255. [func] Add 'message-compression' option to disable DNS compression in responses. [RT #40726] 2015-11-05 12:19:04 +01:00
Evan Hunt
b750a49f3f [master] fixed memory leak in dns_compress_add()
4184.	[bug]		Fixed a possible memory leak in name compression
			when rendering long messages. (Also, improved
			wire_test for testing such messages.) [RT #40375]
2015-08-17 22:41:44 -07:00
Tinderbox User
5e93bad21b update copyright notice / whitespace 2015-03-01 23:45:20 +00:00
Tinderbox User
34eab435ac update copyright notice / whitespace 2015-02-27 23:45:24 +00:00
Mark Andrews
a8da00ef95 4079. [func] Preserve the case of the ownername of records to
the RRset level. [RT #37442]
2015-02-27 15:08:38 +11:00
Automatic Updater
70e5a7403f update copyright notice 2007-06-19 23:47:24 +00:00
Automatic Updater
ec5347e2c7 update copyright notice 2007-06-18 23:47:57 +00:00
Mark Andrews
641f68d427 update copyright notice 2006-03-02 00:37:23 +00:00
Mark Andrews
45e1bd6358 1991. [cleanup] The configuration data, once read, should be treated
as readonly.  Expand the use of const to enforce this
                        at compile time. [RT #15813]
2006-02-28 02:39:52 +00:00
Rob Austein
ab023a6556 1851. [doc] Doxygen comment markup. [RT #11398] 2005-04-27 04:57:32 +00:00
Mark Andrews
408767b505 update copyright notice 2005-03-06 15:30:37 +00:00
Mark Andrews
39c7fc7e00 1811. [func] Preserve the case of domain names in rdata during
zone transfers. [RT #13547]
2005-03-04 02:56:21 +00:00
Mark Andrews
dafcb997e3 update copyright notice 2004-03-05 05:14:21 +00:00
Mark Andrews
c569a0e4d5 1582. [bug] rrset-order failed to work on RRsets with more
than 32 elements. [RT #10381]
2004-02-19 01:23:42 +00:00
David Lawrence
92ef1a9b9d use ISC_MAGIC for all magic numbers, for our friends in EBCDIC land 2001-06-04 19:33:39 +00:00
Brian Wellington
507102c95a In dns_compress_invalidate(), cctx->table cannot be NULL, since it's part of
the cctx structure.
2001-02-15 01:14:16 +00:00
Brian Wellington
29daf5bc77 The suffix returned by dns_compress_findglobal() is never used, so remove it. 2001-02-12 18:07:52 +00:00
Brian Wellington
82ecc44b96 another micro-optimization. 2001-02-10 02:55:05 +00:00
Brian Wellington
64e7f8541d optimization - if the compression table for a message is empty, don't
hash and look up each label.
2001-02-10 01:18:19 +00:00
Brian Wellington
2d6a6174f1 micro-optimizations 2001-02-09 02:13:07 +00:00
Brian Wellington
5d18f1205a remove the call to dns_name_getlabel(), since the dns_name_toregion() macro
is faster.
2001-01-23 02:19:48 +00:00
Brian Wellington
499b34cea0 copyright update 2001-01-09 22:01:04 +00:00
Andreas Gustafsson
b363c64ed6 sizeof() style; added comment 2001-01-07 22:01:12 +00:00
Brian Wellington
1c33761bcf Minor optimization - use the number of labels in the prefix as the loop
counter, not the number of labels in the name.
2001-01-04 19:25:59 +00:00
Brian Wellington
60103a02c6 Update the comments and kill unused structure elements, based on comments from
Mark.
2001-01-04 06:21:01 +00:00
Brian Wellington
dacf0cc454 Merged the private functions compress_add and compress_find into
dns_compress_add and dns_compress_findglobal.
2000-12-29 19:38:50 +00:00
Brian Wellington
bb88eab95f fix an uninitialized variable; reformat some >80 character lines 2000-12-29 18:49:36 +00:00
Brian Wellington
575737b964 Rewrite the name compression code to use a hashtable instead of an RBT and
avoid allocating memory in most cases.  This increases performance by
about 225% on the rc query test (~305 q/s to 990 q/s).
2000-12-29 00:59:41 +00:00
Brian Wellington
942d1a339b Decompression contexts now take a type instead of the "strict" boolean
value - the type can be "any", "strict", or "none".  This fixes potential
problems with compression in unknown rr types.
2000-11-14 23:29:55 +00:00