From: SourceForge.net <no...@so...> - 2010-09-27 18:15:17
|
Patches item #3072080, was opened at 2010-09-20 15:41 Message generated for change (Comment added) made by msofer You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=310894&aid=3072080&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 60. NRE and coroutines Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: miguel sofer (msofer) Assigned to: miguel sofer (msofer) Summary: a saner NRE Initial Comment: Attached a patch that removes all NRE duties from TEBC: it is a relatively big redesign of the NRE main loop. The original NRE implementation has TclNRRunCallbacks (TNRRC) and TEBC work in tandem, working hard to reuse TEBC instances. The design is at the root of a very complicated logic flow within TEBC and elsewhere. This patch removes the special NRE status from TEBC. The main advantage is that the logic is much simpler (both within TEBC and elsewhere), leading to enhanced maintainability. I would appreciate more thorough testing (and perf impact estimates?) before committing this patch. ---------------------------------------------------------------------- >Comment By: miguel sofer (msofer) Date: 2010-09-27 15:15 Message: updated patch - ready to commit as soon as I find out how to handle the 1-line change to itcl ---------------------------------------------------------------------- Comment By: Alexandre Ferrieux (ferrieux) Date: 2010-09-23 03:44 Message: Moving target, aiming again ;-) Attaching new timings: - decache_summary.txt just compares before and after the DECACHE_STACK_INFO commits. I know they were necessary, but IMO it's interesting to keep an eye on the needle when doing brain surgery. Result: a maximum of 6% slowdown, not significant given the other deviations with/out the spacer. - sn2_summary.txt compares current HEAD with inv2.diff. Result: still <=12%... ---------------------------------------------------------------------- Comment By: miguel sofer (msofer) Date: 2010-09-22 13:01 Message: New patch; please apply to HEAD including the 2010-09-22 fixes ---------------------------------------------------------------------- Comment By: miguel sofer (msofer) Date: 2010-09-22 08:45 Message: Mem corruption: some obj's typePtr points to some (other?) obj's string rep: see valgrind's complaint below. Does not at first look like a refCount issue: this is a -DPURIFY build, so that individual objs (and TclSmallAlloc) are all done by calls to ckalloc. ==3585== Invalid read of size 4 ==3585== at 0x807B28B: TclFreeObj (tclObj.c:1413) ==3585== by 0x815C50E: TclResumeByteCode (tclExecute.c:6324) ==3585== by 0x80DCC7B: TclNRRunCallbacks (tclBasic.c:4312) ==3585== by 0x80DEE3F: TclEvalObjEx (tclBasic.c:5887) ==3585== by 0x80DEDCE: Tcl_EvalObjEx (tclBasic.c:5868) ==3585== by 0x816871B: Tcl_RecordAndEvalObj (tclHistory.c:192) ==3585== by 0x80736E6: Tcl_Main (tclMain.c:471) ==3585== by 0x80564C4: main (tclAppInit.c:85) ==3585== Address 0x4317cbf is 127 bytes inside a block of size 196 free'd ==3585== at 0x4024B3A: free (vg_replace_malloc.c:366) ==3585== by 0x818E817: TclpFree (tclAlloc.c:730) ==3585== by 0x80E7B34: Tcl_Free (tclCkalloc.c:1207) ==3585== by 0x807B272: TclFreeObj (tclObj.c:1410) ==3585== by 0x815C50E: TclResumeByteCode (tclExecute.c:6324) ==3585== by 0x80DCC7B: TclNRRunCallbacks (tclBasic.c:4312) ==3585== by 0x80DEE3F: TclEvalObjEx (tclBasic.c:5887) ==3585== by 0x80DEDCE: Tcl_EvalObjEx (tclBasic.c:5868) ==3585== by 0x816871B: Tcl_RecordAndEvalObj (tclHistory.c:192) ==3585== by 0x80736E6: Tcl_Main (tclMain.c:471) ==3585== by 0x80564C4: main (tclAppInit.c:85) ---------------------------------------------------------------------- Comment By: miguel sofer (msofer) Date: 2010-09-22 08:18 Message: Note that this patch also fixes Bug #3072640 ---------------------------------------------------------------------- Comment By: Alexandre Ferrieux (ferrieux) Date: 2010-09-20 18:19 Message: Also, var.test panics on my system (unix threaded, nondebug): Test file error: TclStackFree: incorrect freePtr (0x8421f48 != 0x8421f3f). Call out of sequence? ---------------------------------------------------------------------- Comment By: Alexandre Ferrieux (ferrieux) Date: 2010-09-20 17:40 Message: Attaching perf measurements with the "10-bench + spacer" technique. The first four columns are normalized times. First line headers give the names: - tcl86 == vanilla HEAD - tcl86foo == HEAD + 16-byte foo spacer at beginning of regcomp.o - tcl86sn == HEAD + Saner Nre patch - tcl86snfoo == both File sorted on column 3, which is tcl86sn time. Bottom line: hard to summarize... range is roughly +-12%, though near both extremes the foo-spacer wipes the effect. Tough... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=310894&aid=3072080&group_id=10894 |