Move a metrics counter so that it can be used to indirectly witness the race condition fix from [f5274e00f17d58e0] by recording varying final values for that metric across consecutive multi-threaded test runs.
FossilOrigin-Name: 54d2209d24547dbb05e7c12daa27211593c34de8005e8adba0989b8d219f5f3b
This commit is contained in:
parent
4e9b48cfc4
commit
bdb149d063
@ -1263,11 +1263,11 @@ static S3JniNphClass * S3JniGlobal__nph(JNIEnv * const env, S3JniNphRef const* p
|
||||
&& (pRef->index < (sizeof(S3JniNphRefs) / sizeof(S3JniNphRef))) );
|
||||
if( !pNC->pRef ){
|
||||
S3JniMutex_Nph_enter;
|
||||
s3jni_incr( &SJG.metrics.nNphInit );
|
||||
if( !pNC->pRef ){
|
||||
jclass const klazz = (*env)->FindClass(env, pRef->zName);
|
||||
S3JniExceptionIsFatal("FindClass() unexpectedly threw");
|
||||
pNC->klazz = S3JniRefGlobal(klazz);
|
||||
s3jni_incr( &SJG.metrics.nNphInit );
|
||||
pNC->pRef = pRef
|
||||
/* Must come last to avoid a race condition where pNC->klass
|
||||
can be NULL after this function returns. */;
|
||||
@ -1287,11 +1287,10 @@ static S3JniNphClass * S3JniGlobal__nph(JNIEnv * const env, S3JniNphRef const* p
|
||||
static jfieldID NativePointerHolder_field(JNIEnv * const env,
|
||||
S3JniNphRef const* pRef){
|
||||
S3JniNphClass * const pNC = S3JniGlobal_nph(pRef);
|
||||
assert( pNC->klazz );
|
||||
if( !pNC->fidValue ){
|
||||
S3JniMutex_Nph_enter;
|
||||
s3jni_incr( &SJG.metrics.nNphInit );
|
||||
if( !pNC->fidValue ){
|
||||
s3jni_incr( &SJG.metrics.nNphInit );
|
||||
pNC->fidValue = (*env)->GetFieldID(env, pNC->klazz,
|
||||
pRef->zMember, pRef->zTypeSig);
|
||||
S3JniExceptionIsFatal("Code maintenance required: missing "
|
||||
@ -1489,8 +1488,8 @@ static jfieldID OutputPointer_field(JNIEnv * const env, S3JniNphRef const * pRef
|
||||
assert( pNC->klazz );
|
||||
if( !pNC->fidValue ){
|
||||
S3JniMutex_Nph_enter;
|
||||
s3jni_incr( &SJG.metrics.nNphInit );
|
||||
if( !pNC->fidValue ){
|
||||
s3jni_incr( &SJG.metrics.nNphInit );
|
||||
pNC->fidValue = (*env)->GetFieldID(env, pNC->klazz, pRef->zMember, pRef->zTypeSig);
|
||||
S3JniExceptionIsFatal("OutputPointer_field() could not find OutputPointer.*.value");
|
||||
}
|
||||
@ -1676,8 +1675,8 @@ static jobject new_NativePointerHolder_object(JNIEnv * const env, S3JniNphRef co
|
||||
S3JniNphClass * const pNC = S3JniGlobal_nph(pRef);
|
||||
if( !pNC->midCtor ){
|
||||
S3JniMutex_Nph_enter;
|
||||
s3jni_incr( &SJG.metrics.nNphInit );
|
||||
if( !pNC->midCtor ){
|
||||
s3jni_incr( &SJG.metrics.nNphInit );
|
||||
pNC->midCtor = (*env)->GetMethodID(env, pNC->klazz, "<init>", "()V");
|
||||
S3JniExceptionIsFatal("Cannot find constructor for class.");
|
||||
}
|
||||
|
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Resolve\sa\sJNI-side\srace\scondition.\sRemoved\sa\snow-extraneous\sstruct\smember.\sInternal\sAPI\srenaming\sfor\sconsistency.
|
||||
D 2023-08-28T13:06:26.423
|
||||
C Move\sa\smetrics\scounter\sso\sthat\sit\scan\sbe\sused\sto\sindirectly\switness\sthe\srace\scondition\sfix\sfrom\s[f5274e00f17d58e0]\sby\srecording\svarying\sfinal\svalues\sfor\sthat\smetric\sacross\sconsecutive\smulti-threaded\stest\sruns.
|
||||
D 2023-08-28T13:18:46.495
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -236,7 +236,7 @@ F ext/icu/sqliteicu.h fa373836ed5a1ee7478bdf8a1650689294e41d0c89c1daab26e9ae78a3
|
||||
F ext/jni/GNUmakefile 374873bf6d2cd6ceafb458e28b59140dbb074f01f7adddf7e15a3ee3daf44551
|
||||
F ext/jni/README.md 1332b1fa27918bd5d9ca2d0d4f3ac3a6ab86b9e3699dc5bfe32904a027f3d2a9
|
||||
F ext/jni/jar-dist.make 030aaa4ae71dd86e4ec5e7c1e6cd86f9dfa47c4592c070d2e35157e42498e1fa
|
||||
F ext/jni/src/c/sqlite3-jni.c 59c06b99420d61baf03004fc47093e786bde383ffe5d70e1458443e095a4fd78
|
||||
F ext/jni/src/c/sqlite3-jni.c 515464940aba09b6428f8a804660710aa365863d5a10699d5ac8321d83dddf64
|
||||
F ext/jni/src/c/sqlite3-jni.h 12e1a5ef5ee1795dc22577c285b4518dfd8aa4af45757f6cb81a555d967bf201
|
||||
F ext/jni/src/org/sqlite/jni/AbstractCollationCallback.java 95e88ba04f4aac51ffec65693e878e234088b2f21b387f4e4285c8b72b33e436
|
||||
F ext/jni/src/org/sqlite/jni/AggregateFunction.java 7312486bc65fecdb91753c0a4515799194e031f45edbe16a6373cea18f404dc4
|
||||
@ -2106,8 +2106,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 77d3dcd283595c52f24c07fc59ba60c9133b71c440cf3f799cf48c907c6fae3e
|
||||
R 09b3f39e435c1ed6b663c3c2289d1181
|
||||
P f5274e00f17d58e075f90ae5c1d4b38933da315e51592171fa35bcbd67b40b2a
|
||||
R 969ab0bad5a3d98cbcd198512cf4e202
|
||||
U stephan
|
||||
Z e20dad0d4d283548754a87d23449f696
|
||||
Z 99163d5b88e11a26824bdaa0e0b1c0e2
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
@ -1 +1 @@
|
||||
f5274e00f17d58e075f90ae5c1d4b38933da315e51592171fa35bcbd67b40b2a
|
||||
54d2209d24547dbb05e7c12daa27211593c34de8005e8adba0989b8d219f5f3b
|
Loading…
Reference in New Issue
Block a user