Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Get all test cases working with the mutex-free-pcache implementation. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | mutex-free-pcache |
Files: | files | file ages | folders |
SHA1: |
2dc98d29995bef51108e99aa8f7a5642 |
User & Date: | drh 2011-01-18 16:13:27.224 |
Context
2011-01-18
| ||
17:03 | Do not use mutexes in the pcache implementation unless SQLITE_ENABLE_MEMORY_MANAGMENT is defined. This is a performance enhancement. A side effect is that pcaches will not steal pages from one another unless ENABLE_MEMORY_MANAGEMENT is set, or unless SQLITE_THREADSAFE=0. (check-in: e5ca59e63b user: drh tags: trunk) | |
16:13 | Get all test cases working with the mutex-free-pcache implementation. (Closed-Leaf check-in: 2dc98d2999 user: drh tags: mutex-free-pcache) | |
15:17 | Do not use SQLITE_MUTEX_STATIC_MEM2 since it has been reused as STATIC_OPEN. Instead, create a new static mutex STATIC_PMEM which is an alias for the unused STATIC_LRU2. (check-in: f1cf02efcb user: drh tags: mutex-free-pcache) | |
Changes
Changes to test/memsubsys1.test.
︙ | ︙ | |||
92 93 94 95 96 97 98 99 100 | db close sqlite3_shutdown sqlite3_config_pagecache [expr 1024+$xtra_size] 20 sqlite3_initialize reset_highwater_marks build_test_db memsubsys1-2 {PRAGMA page_size=1024} #show_memstats do_test memsubsys1-2.3 { set pg_ovfl [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 2] | > | | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | db close sqlite3_shutdown sqlite3_config_pagecache [expr 1024+$xtra_size] 20 sqlite3_initialize reset_highwater_marks build_test_db memsubsys1-2 {PRAGMA page_size=1024} #show_memstats set MEMORY_MANAGEMENT $sqlite_options(memorymanage) do_test memsubsys1-2.3 { set pg_ovfl [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 2] } [expr ($AUTOVACUUM+$TEMP_STORE+$MEMORY_MANAGEMENT>=3)*1024] do_test memsubsys1-2.4 { set pg_used [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0] 2] } 20 do_test memsubsys1-2.5 { set s_used [lindex [sqlite3_status SQLITE_STATUS_SCRATCH_USED 0] 2] } 0 |
︙ | ︙ |
Changes to test/mutex1.test.
︙ | ︙ | |||
116 117 118 119 120 121 122 | clear_mutex_counters sqlite3 db test.db -nomutex 0 -fullmutex 0 catchsql { CREATE TABLE abc(a, b, c) } db eval { INSERT INTO abc VALUES(1, 2, 3); } } {} | > > | | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | clear_mutex_counters sqlite3 db test.db -nomutex 0 -fullmutex 0 catchsql { CREATE TABLE abc(a, b, c) } db eval { INSERT INTO abc VALUES(1, 2, 3); } } {} ifcapable !memorymanage { regsub { static_lru} $mutexes {} mutexes } do_test mutex1.2.$mode.3 { mutex_counters counters set res [list] foreach {key value} [array get counters] { if {$key ne "total" && $value > 0} { lappend res $key |
︙ | ︙ |
Changes to test/pcache.test.
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | set testdir [file dirname $argv0] source $testdir/tester.tcl # Do not use a codec for tests in this file, as the database file is # manipulated directly using tcl scripts (using the [hexio_write] command). # do_not_use_codec # The pcache module limits the number of pages available to purgeable # caches to the sum of the 'cache_size' values for the set of open # caches. This block of tests, pcache-1.*, test that the library behaves # corrctly when it is forced to exceed this limit. # do_test pcache-1.1 { | > > > > > > > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | set testdir [file dirname $argv0] source $testdir/tester.tcl # Do not use a codec for tests in this file, as the database file is # manipulated directly using tcl scripts (using the [hexio_write] command). # do_not_use_codec # Only works with a mode-2 pcache where all pcaches share a single set # of pages. # ifcapable {!memorymanage && threadsafe} { finish_test return } # The pcache module limits the number of pages available to purgeable # caches to the sum of the 'cache_size' values for the set of open # caches. This block of tests, pcache-1.*, test that the library behaves # corrctly when it is forced to exceed this limit. # do_test pcache-1.1 { |
︙ | ︙ |