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

Side by Side Diff: third_party/sqlite/patches/0003-Use-seperate-page-cache-pools-for-each-sqlite-connec.patch

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 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
OLDNEW
1 From 22030cd2e05e746a169066c37b28c580b0a57284 Mon Sep 17 00:00:00 2001 1 From 3a6d9302ff14aec82291c7e2212ce37b7453ce9f Mon Sep 17 00:00:00 2001
2 From: rmcilroy <rmcilroy@chromium.org> 2 From: rmcilroy <rmcilroy@chromium.org>
3 Date: Thu, 20 Jun 2013 22:50:12 +0000 3 Date: Thu, 20 Jun 2013 22:50:12 +0000
4 Subject: [PATCH 04/23] Use seperate page-cache pools for each sqlite 4 Subject: [PATCH 03/16] Use seperate page-cache pools for each sqlite
5 connection. 5 connection.
6 6
7 Due to multiple different subsystems using sqlite, the shared global page 7 Due to multiple different subsystems using sqlite, the shared global page
8 cache policy does not suite our use-cases on Chrome very well. This CL 8 cache policy does not suite our use-cases on Chrome very well. This CL
9 enables a compile time flag to be set to disable shared cache pools. 9 enables a compile time flag to be set to disable shared cache pools.
10 10
11 BUG=243769 11 BUG=243769
12 12
13 Original review URL: https://chromiumcodereview.appspot.com/17413004 13 Original review URL: https://chromiumcodereview.appspot.com/17413004
14 --- 14 ---
15 third_party/sqlite/src/src/pcache1.c | 8 ++++++-- 15 third_party/sqlite/src/src/pcache1.c | 6 +++++-
16 1 file changed, 6 insertions(+), 2 deletions(-) 16 1 file changed, 5 insertions(+), 1 deletion(-)
17 17
18 diff --git a/third_party/sqlite/src/src/pcache1.c b/third_party/sqlite/src/src/p cache1.c 18 diff --git a/third_party/sqlite/src/src/pcache1.c b/third_party/sqlite/src/src/p cache1.c
19 index ad44395..e4d0705 100644 19 index a8c3217..3fcee4b 100644
20 --- a/third_party/sqlite/src/src/pcache1.c 20 --- a/third_party/sqlite/src/src/pcache1.c
21 +++ b/third_party/sqlite/src/src/pcache1.c 21 +++ b/third_party/sqlite/src/src/pcache1.c
22 @@ -549,10 +549,12 @@ static sqlite3_pcache *pcache1Create(int szPage, int bPurg eable){ 22 @@ -567,6 +567,8 @@ static sqlite3_pcache *pcache1Create(int szPage, int szExtra , int bPurgeable){
23 int sz; /* Bytes of memory required to allocate the new cache * /
24
25 /*
26 - ** The seperateCache variable is true if each PCache has its own private
27 + ** The separateCache variable is true if each PCache has its own private
28 ** PGroup. In other words, separateCache is true for mode (1) where no 23 ** PGroup. In other words, separateCache is true for mode (1) where no
29 ** mutexing is required. 24 ** mutexing is required.
30 ** 25 **
31 + ** * Always use separate caches (mode-1) if SQLITE_SEPARATE_CACHE_POOLS 26 + ** * Always use separate caches (mode-1) if SQLITE_SEPARATE_CACHE_POOLS
32 + ** 27 + **
33 ** * Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT 28 ** * Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT
34 ** 29 **
35 ** * Always use a unified cache in single-threaded applications 30 ** * Always use a unified cache in single-threaded applications
36 @@ -560,7 +562,9 @@ static sqlite3_pcache *pcache1Create(int szPage, int bPurgea ble){ 31 @@ -574,7 +576,9 @@ static sqlite3_pcache *pcache1Create(int szPage, int szExtra , int bPurgeable){
37 ** * Otherwise (if multi-threaded and ENABLE_MEMORY_MANAGEMENT is off) 32 ** * Otherwise (if multi-threaded and ENABLE_MEMORY_MANAGEMENT is off)
38 ** use separate caches (mode-1) 33 ** use separate caches (mode-1)
39 */ 34 */
40 -#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0 35 -#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0
41 +#ifdef SQLITE_SEPARATE_CACHE_POOLS 36 +#ifdef SQLITE_SEPARATE_CACHE_POOLS
42 + const int separateCache = 1; 37 + const int separateCache = 1;
43 +#elif defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0 38 +#elif defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0
44 const int separateCache = 0; 39 const int separateCache = 0;
45 #else 40 #else
46 int separateCache = sqlite3GlobalConfig.bCoreMutex>0; 41 int separateCache = sqlite3GlobalConfig.bCoreMutex>0;
47 -- 42 --
48 2.2.1 43 2.2.1
49 44
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698