Open rurban opened 9 years ago
Reini Urban logged work - 2015-07-15 2:15 PM Time Spent: 2 days
added a stats branch feature/CM-600-cperl-cowrefcnt-stats
added a feature branch with split U8:U24
this almost works, still some wrong string end somewhere.
worked on another U16:U16 split, but this failed
worked on another new PV* branch (sv_cowrefcnt only with strings),
but this is very questionable, as all the API calls have to be changed.
logged work - 2015-07-17 9:10 AM - edited Time Spent: 2 days
With commit 342dfb3db407c42542f3416a51a5fd794da2e264 Author: Reini Urban rurban@cpanel.net Date: Mon Jul 13 19:31:29 2015 +0200 CowREFCNT: new sv_cowrefcnt, shared with sv_refcnt The tests pass now with DEBUGGING, but fail without
logged work - 2015-07-19 3:48 PM Time Spent: 2 days
Fixed a couple of more issues: fixed non-DEBUGGING in ext/re fixed DynaLoader error message (missing symbol in re) globvar fixed remaining error: COW regression t/perf/speed.t, i.e. big string not COW'ed.
This disallowed using static strings in B::C since 5.18. We really need static strings for the shared keys and filenames. When done, we could eventually be even better than 5.14, storing more COW (now "real cow") strings than before.
CowREFCNT: seperate from string, share with sv_refcnt
For read-only strings (i.e. embedded and with the compiler) and with threads it makes no sense to share the volatile cowrefcnt with the read-only buffer of the string. We cannot use strings as read-only, and cannot compile them into a constant segment, we even need to them to be initialized dynamically. This is one of the reasons why the compiler is not performant since 5.18 anymore
Maybe: Add PV* and STRUCT_PV as alternative view of an SV*, add PvREFCNT() to make it clear. PVs are all structs starting with xpv, just not AV, HV, IO as they have no cowable strings.
Add stats for highest SvREFCNT and CowREFCNT with -DC at the end.
Result with the core testsuite: Typically 820 refcnt (the "_>file" GV), 5 cow
Highest outliers: t/re/uniprops.t == max refcnt: 118480 max cowrefcnt: 255 t/porting/podcheck.t == max refcnt: 6121 max cowrefcnt: 255
See https://github.com/perl11/cperl/commits/feature/CM-600-cperl-cowrefcnt