New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move CowREFCNT int away from PV #8

Open
rurban opened this Issue Sep 11, 2015 · 3 comments

Comments

1 participant
@rurban
Member

rurban commented Sep 11, 2015

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

@rurban rurban self-assigned this Sep 11, 2015

@rurban rurban added the compiler label Sep 11, 2015

@rurban

This comment has been minimized.

Show comment
Hide comment
@rurban

rurban Sep 11, 2015

Member

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.

Member

rurban commented Sep 11, 2015

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.

@rurban

This comment has been minimized.

Show comment
Hide comment
@rurban

rurban Sep 11, 2015

Member

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

Member

rurban commented Sep 11, 2015

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

@rurban

This comment has been minimized.

Show comment
Hide comment
@rurban

rurban Sep 11, 2015

Member

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.

Member

rurban commented Sep 11, 2015

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.

@rurban rurban added this to the v5.24.0 milestone Sep 13, 2015

@rurban rurban modified the milestones: v5.26.0, v5.24.0 May 10, 2016

@rurban rurban added the in progress label Dec 1, 2016

@rurban rurban added ready and removed in progress labels Jan 8, 2017

@rurban rurban removed this from the v5.26.0c milestone Mar 2, 2017

@rurban rurban added in progress and removed blocking ready labels Mar 2, 2017

@rurban rurban removed the in progress label Mar 30, 2017

@rurban rurban added this to In progress in cperl Dec 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment