This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #117855] Store CopFILEGV in a pad under ithreads
authorFather Chrysostomos <sprout@cpan.org>
Sat, 6 Jul 2013 05:51:50 +0000 (22:51 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 5 Aug 2013 09:23:28 +0000 (02:23 -0700)
commitc82ecf346a8512f22f25188e450d92938c245421
tree4a8a85a9655bcb136136674dc3f838204bc9d202
parent38be3d0038ef87b22af88f80db1fbeb0292ce53b
[perl #117855] Store CopFILEGV in a pad under ithreads

This saves having to allocate a separate string buffer for every cop
(control op; every statement has one).

Under non-threaded builds, every cop has a pointer to the GV for that
source file, namely *{"_<filename"}.

Under threaded builds, the name of the GV used to be stored instead.

Now we store an offset into the per-interpreter PL_filegvpad, which
points to the GV.

This makes no significant speed difference, but it reduces mem-
ory usage.
19 files changed:
MANIFEST
cop.h
embed.fnc
embed.h
embedvar.h
ext/B/B.pm
ext/B/B.xs
ext/XS-APItest/APItest.xs
ext/XS-APItest/t/cop.t [moved from ext/XS-APItest/t/copstash.t with 78% similarity]
gv.c
inline.h
intrpvar.h
makedef.pl
op.c
perl.c
proto.h
scope.c
scope.h
sv.c