From 1341c7c22ce500a11d92350131baa5f28dc1390d Mon Sep 17 00:00:00 2001 From: Robert Relyea Date: Sat, 18 Apr 2020 17:11:20 -0700 Subject: Bug 1603801 [patch] Avoid dcache pollution from sdb_measureAccess() r=mt As implemented, when sdb_measureAccess() runs it creates up to 10,000 negative dcache entries (cached nonexistent filenames). There is no advantage to leaving these particular filenames in the cache; they will never be searched again. Subsequent runs will run a new test with an intentionally different set of filenames. This can have detrimental effects on some systems; a massive negative dcache can lead to memory or performance problems. Since not all platforms have a problem with negative dcache entries, this patch is limitted to those platforms that request it at compilie time (Linux is current the only patch that does.) Differential Revision: https://phabricator.services.mozilla.com/D59652 --- coreconf/config.gypi | 1 + 1 file changed, 1 insertion(+) (limited to 'coreconf/config.gypi') diff --git a/coreconf/config.gypi b/coreconf/config.gypi index 6459bccc9..d18875965 100644 --- a/coreconf/config.gypi +++ b/coreconf/config.gypi @@ -362,6 +362,7 @@ '_DEFAULT_SOURCE', # for functions, strdup, realpath, and getentropy '_BSD_SOURCE', # for the above in glibc <= 2.19 '_POSIX_SOURCE', # for + 'SQL_MEASURE_USE_TEMP_DIR', # use tmpdir for the access calls ], }], [ 'OS=="dragonfly" or OS=="freebsd"', { -- cgit v1.2.1