Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Side by Side Diff: third_party/sqlite/BUILD.gn

Issue 2963633002: Clarify SQlite threadsafety compile flags. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//testing/libfuzzer/fuzzer_test.gni") 5 import("//testing/libfuzzer/fuzzer_test.gni")
6 6
7 declare_args() { 7 declare_args() {
8 # Controls whether the build should uses the version of sqlite3 library 8 # Controls whether the build should uses the version of sqlite3 library
9 # shipped with the system (currently only supported on iOS) or the one 9 # shipped with the system (currently only supported on iOS) or the one
10 # shipped with Chromium source. 10 # shipped with Chromium source.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 "SQLITE_DISABLE_FTS4_DEFERRED", 56 "SQLITE_DISABLE_FTS4_DEFERRED",
57 "SQLITE_ENABLE_ICU", 57 "SQLITE_ENABLE_ICU",
58 "SQLITE_ENABLE_MEMORY_MANAGEMENT", 58 "SQLITE_ENABLE_MEMORY_MANAGEMENT",
59 "SQLITE_SECURE_DELETE", 59 "SQLITE_SECURE_DELETE",
60 60
61 # Custom flag to tweak pcache pools. 61 # Custom flag to tweak pcache pools.
62 # TODO(shess): This shouldn't use faux-SQLite naming. 62 # TODO(shess): This shouldn't use faux-SQLite naming.
63 "SQLITE_SEPARATE_CACHE_POOLS", 63 "SQLITE_SEPARATE_CACHE_POOLS",
64 64
65 # TODO(shess): SQLite adds mutexes to protect structures which cross 65 # TODO(shess): SQLite adds mutexes to protect structures which cross
66 # threads. In theory Chromium should be able to turn this off for a 66 # threads. In theory Chromium should be able to turn this to "2" which
67 # slight speed boost. 67 # should give a slight speed boost. "2" is safe as long as a single
68 "THREADSAFE", 68 # connection is not used by more than one thread at a time.
69 "SQLITE_THREADSAFE=1",
69 70
70 # SQLite can spawn threads to sort in parallel if configured 71 # SQLite can spawn threads to sort in parallel if configured
71 # appropriately. Chromium doesn't configure SQLite for that, and would 72 # appropriately. Chromium doesn't configure SQLite for that, and would
72 # prefer to control distribution to worker threads. 73 # prefer to control distribution to worker threads.
73 "SQLITE_MAX_WORKER_THREADS=0", 74 "SQLITE_MAX_WORKER_THREADS=0",
74 75
75 # Allow 256MB mmap footprint per connection. Should not be too open-ended 76 # Allow 256MB mmap footprint per connection. Should not be too open-ended
76 # as that could cause memory fragmentation. 50MB encompasses the 99th 77 # as that could cause memory fragmentation. 50MB encompasses the 99th
77 # percentile of Chrome databases in the wild. 78 # percentile of Chrome databases in the wild.
78 # TODO(shess): A 64-bit-specific value could be 1G or more. 79 # TODO(shess): A 64-bit-specific value could be 1G or more.
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 fuzzer_test("sqlite3_ossfuzz_fuzzer") { 291 fuzzer_test("sqlite3_ossfuzz_fuzzer") {
291 # TODO(mmoroz, shess): remove fuzz/ossfuzz.c after next sqlite3 update. 292 # TODO(mmoroz, shess): remove fuzz/ossfuzz.c after next sqlite3 update.
292 sources = [ 293 sources = [
293 "fuzz/ossfuzz.c", 294 "fuzz/ossfuzz.c",
294 ] 295 ]
295 deps = [ 296 deps = [
296 ":sqlite", 297 ":sqlite",
297 ] 298 ]
298 dict = "fuzz/sql.dict" 299 dict = "fuzz/sql.dict"
299 } 300 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698