The following tests fails: Running /home/mark/src/systemtap/testsuite/systemtap.base/cache.exp ... [...] Pass 1: parsed user script and 65 library script(s) using 84412virt/20504res/253 2shr kb, in 180usr/10sys/188real ms. Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) usin g 84808virt/21224res/2844shr kb, in 10usr/0sys/7real ms. /usr/local/build/systemtap-obj/testsuite/.cache_test-root/cache/1f/stap_1f0a2a26 f9b907ea079e260f1d342d60_77.ko Pass 3: using cached /usr/local/build/systemtap-obj/testsuite/.cache_test-root/c ache/1f/stap_1f0a2a26f9b907ea079e260f1d342d60_77.c Pass 4: using cached /usr/local/build/systemtap-obj/testsuite/.cache_test-root/c ache/1f/stap_1f0a2a26f9b907ea079e260f1d342d60_77.ko FAIL: RUNTIME1 was cached Since the following commit: commit 0d1ad607311857dc0b4666ce8a84c1a59c615ab9 Author: Wenji Huang <wenji.huang@oracle.com> Date: Wed Feb 3 10:21:24 2010 +0800 PR9931: generate log to help diagnosing occasional cache hash collisions Ideas from Frank Ch. Eigler: - extending the hash.add() function to pass names along with the hash-mix values, so that class hash can internally track the hash-report string - storing the reports themselves in the cache, beside the .ko / .c files, and changing the cache-size-limit logic to delete these .txt files upon garbage collection * hash.h : New member parm_stream. * hash.cxx (get_parms): New function to convert parms stream to string. (hash::add): Aggregrate parms stream. (create_hash_log): New function to log hash operation. (find_*_hash): Log hash at the end of function. * cache.cxx (clean_cache): Remove log when cache reaches limitation.
This is because the new hash copy constructor is restarting the md4 computation, so everything from get_base_hash is lost. We should be copying the md4 state instead. diff --git a/hash.h b/hash.h index 173f8e5..0c1a745 100644 --- a/hash.h +++ b/hash.h @@ -19,7 +19,7 @@ private: public: hash() { start(); } - hash(const hash &base) { start(); parm_stream << base.parm_stream.str();} + hash(const hash &base) { md4 = base.md4; parm_stream << base.parm_stream.str(); } void start();
(In reply to comment #1) > This is because the new hash copy constructor is restarting the md4 computation, > so everything from get_base_hash is lost. We should be copying the md4 state > instead. Sorry, I missed that. > > diff --git a/hash.h b/hash.h > index 173f8e5..0c1a745 100644 > --- a/hash.h > +++ b/hash.h > @@ -19,7 +19,7 @@ private: > > public: > hash() { start(); } > - hash(const hash &base) { start(); parm_stream << base.parm_stream.str();} > + hash(const hash &base) { md4 = base.md4; parm_stream << base.parm_stream.str(); } Thank Josh. Please commit the patch.
commit 4fa8e6497