From: dan Date: Thu, 12 May 2016 17:06:04 +0000 (+0000) Subject: Add extra OPTIMIZATION-IF-FALSE comments where required to pcache.c. X-Git-Tag: version-3.13.0~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82c0447701840cb933cad5b15243cd9c07d885a5;p=thirdparty%2Fsqlite.git Add extra OPTIMIZATION-IF-FALSE comments where required to pcache.c. FossilOrigin-Name: 9d55b8f541de43deb82d460d32005fd62f5430b2 --- diff --git a/manifest b/manifest index e3477b52b0..d2c32e5bc9 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C For\sin-memory\sdatabases,\sit\sdoes\snot\smatter\sif\spcache\sentries\sare\smarked\n"clean"\sor\s"writable". -D 2016-05-12T12:08:48.058 +C Add\sextra\sOPTIMIZATION-IF-FALSE\scomments\swhere\srequired\sto\spcache.c. +D 2016-05-12T17:06:04.756 F Makefile.in 9eda6e1c90d05c199c3ec8a7069b0682ad307657 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc db82b35aef27f412fef14d8534afc022138bcdfd @@ -367,7 +367,7 @@ F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca F src/pager.c baef5d8d31d220001fc61013f401c98950749201 F src/pager.h 329bdf078a4e0a3b35084534d58625d21fd03681 F src/parse.y 10eb2f3fb62341291528c7984498054731f9d31e -F src/pcache.c 5291b6ab838132f856fe8067ca25772d221c4864 +F src/pcache.c 3ef140add88d8d3eee3a80a79412f450bd216d3b F src/pcache.h 33b40350df1b6c278e019dee37f87e1bac276223 F src/pcache1.c 7f51d2b541aab57596adf62db2c4bb025d34f04d F src/pragma.c faf42922bb7ab2f6672cb550356c1967abae3c84 @@ -1488,8 +1488,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 0dc50d9915cd88916229ca5c3834de82fa16f017 ad601c7962a60a11699cf31f1faee09b95d5c710 -R 7667d141b3239c7f232de8ca756273cf -T +closed ad601c7962a60a11699cf31f1faee09b95d5c710 -U drh -Z 488a663f0afeb720045f9ee67fd9acb5 +P 06c1e27ca868f247f8c27b03eb19aac004f28650 +R e01f1d97945350d1485afdc3dc2f5468 +U dan +Z fe74337e6648e1a589818404220bbdb0 diff --git a/manifest.uuid b/manifest.uuid index 90f4a0036f..8e69ca85ac 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -06c1e27ca868f247f8c27b03eb19aac004f28650 \ No newline at end of file +9d55b8f541de43deb82d460d32005fd62f5430b2 \ No newline at end of file diff --git a/src/pcache.c b/src/pcache.c index ee7914a444..f8fe901776 100644 --- a/src/pcache.c +++ b/src/pcache.c @@ -424,8 +424,11 @@ void SQLITE_NOINLINE sqlite3PcacheRelease(PgHdr *p){ if( (--p->nRef)==0 ){ if( p->flags&PGHDR_CLEAN ){ pcacheUnpin(p); - }else if( p->pDirtyPrev!=0 ){ - /* Move the page to the head of the dirty list. */ + }else if( p->pDirtyPrev!=0 ){ /*OPTIMIZATION-IF-FALSE*/ + /* Move the page to the head of the dirty list. If p->pDirtyPrev==0, + ** then page p is already at the head of the dirty list and the + ** following call would be a no-op. Hence the OPTIMIZATION-IF-FALSE + ** tag above. */ pcacheManageDirtyList(p, PCACHE_DIRTYLIST_FRONT); } } @@ -460,7 +463,7 @@ void sqlite3PcacheDrop(PgHdr *p){ */ void sqlite3PcacheMakeDirty(PgHdr *p){ assert( p->nRef>0 ); - if( p->flags & (PGHDR_CLEAN|PGHDR_DONT_WRITE) ){ + if( p->flags & (PGHDR_CLEAN|PGHDR_DONT_WRITE) ){ /*OPTIMIZATION-IF-FALSE*/ p->flags &= ~PGHDR_DONT_WRITE; if( p->flags & PGHDR_CLEAN ){ p->flags ^= (PGHDR_DIRTY|PGHDR_CLEAN);