In perl.git, the branch smoke-me/bulk88/sv_immortal has been created

<http://perl5.git.perl.org/perl.git/commitdiff/8997b470951de8ec732e2e119de3ff8734c3cf23?hp=0000000000000000000000000000000000000000>

        at  8997b470951de8ec732e2e119de3ff8734c3cf23 (commit)

- Log -----------------------------------------------------------------
commit 8997b470951de8ec732e2e119de3ff8734c3cf23
Author: Daniel Dragan <[email protected]>
Date:   Sat Apr 2 13:13:49 2016 -0400

    initialize PL_sv_placeholder at C compile time
    
    In commit 643157af7a PL_sv_placeholder from 5.9.0 changed from being an
    interp global to process global. It was still being initialized, possibly
    multiple times, in perl.c. Since its process global now, initialize it once
    at C compile time (so the var is initialized on disk in .data section),
    not everytime the interp startups (previously PL_sv_holder was in .bss
    section). This saves some CPU instructions and a theoretical but in
    practice not seen, race/intermediate state of the refcount and svflags
    members of PL_sv_placeholder.
    
    The "plvarsp->Gsv_placeholder.sv_flags = 0;" from commit 5c64bffd0d from
    5.19.1 seems like a bug, since PL_sv_placehodler would loose RO-ness with
    that statement. In any case, the PERLVARI from perlvars.h executes half a
    screen above in Perl_init_global_struct in util.c and initializes
    PL_sv_placeholder at that time.
    
    .text section of VC Win32 perl523.dll threaded -O1 before is 0xE3CFB bytes
    of machine code long and after this commit is 0xE3CAB.

M       perlvars.h
M       sv.h
M       util.c

commit 6aa0d2d3c07a31f601a6436dd285bcfc1426c824
Author: Daniel Dragan <[email protected]>
Date:   Sat Apr 2 12:14:42 2016 -0400

    remove SvREADONLY && SvIMMORTAL cargo culting
    
    Prior to commit d689ffdd6d in 5.004, there was some sketchy inconsistent
    behavior of using RO flag to indicate immortals. The RO flag on the SV
    is really irrelavent to immortals, since we know there are only 4 immortal
    SVs possible. Adding more at runtime is impossible. An immortal without
    RO flag is impossible and illegal/mem corruption if it happens. Checking
    the RO flag involves a mem read of the SV head and branch. To simplify
    the code, remove the RO flag check branch and just do the bounds checks
    in SvIMMORTAL, no memory read involved since var sv will already be a
    register probably. This commit is releated to commit "simplify SvIMMORTAL"
    and "Revert "include SvREADONLY() in SvIMMORTAL() test" and commit
    3041a168ea .
    
    .text section of VC Win32 perl523.dll threaded -O1 before is 0xE3D1B bytes
    of machine code long and after this commit is 0xE3CFB.

M       sv.c

commit 8bdcd0af6cfeb94b437d32b90c30d52a02afbaf4
Author: Daniel Dragan <[email protected]>
Date:   Sat Apr 2 12:29:19 2016 -0400

    simplify SvIMMORTAL
    
    .text section of VC Win32 perl523.dll threaded -O1 before is 0xE3DBB bytes
    of machine code long, after is 0xE3D1B. Create an array (its a struct
    in the code for readability) and then range check the pointer against low
    and high address range of what is an immortal SV. With unthreaded perl,
    put PL_sv_placeholder and the 3 other immortals together, on threaded perl
    PL_sv_placeholder is process global while the other 3 are per interp so
    3 branches have to be used for threaded instead of 2 branches. Prior to
    this commit SvIMMORTAL was 4 branches on all perls.

M       dist/threads/lib/threads.pm
M       dist/threads/threads.xs
M       embedvar.h
M       intrpvar.h
M       perlvars.h
M       sv.c
M       sv.h

commit 2fe37b4c1bc8a475e624ca34c83dccaf1281e1cb
Author: Daniel Dragan <[email protected]>
Date:   Sat Apr 2 00:45:33 2016 -0400

    Revert "include SvREADONLY() in SvIMMORTAL() test"
    
    This reverts commit 3041a168eaf8027c9e376a53450bcb825f527da8.
    
    .text section of VC Win32 perl523.dll threaded -O1 before is 0xE3DDB bytes
    of machine code long, after is 0xE3DBB. Instructions are saved because an
    extra branch was removed. A check of a ptr in a register against a constant
    (PL_* global on unthreaded) or near constant (reg with my_perl+offset)
    avoids a memory read of the SV head to get the flags, for the previous
    reasons and to enable a future optimization to SvIMMORTAL, revert this
    commit.

M       sv.c
M       sv.h

commit 40d08e2a3002f13bd1afeb4b54957a53fb328402
Author: Daniel Dragan <[email protected]>
Date:   Fri Apr 1 02:28:12 2016 -0400

    factor out GvHVn(PL_incgv) from pp_require
    
    This decreases the size of .text section VC 2013 perl523.dll 32b -O1 from
    0xE3E1B bytes of machine code to 0xE3DCB by removing redundant calls to
    gv_add_by_type.

M       pp_ctl.c
-----------------------------------------------------------------------

--
Perl5 Master Repository

Reply via email to