Skip to content

php-in-php: drop Type::initialize always-on ProcessIdentity/gettimeofday/getrusage/net/ListUnpack ensureLinked — lazy Jit* ABI (peer #34320) #34327

Description

@PurHur

Category

php-in-php / runtime-shrink · cold-build surface · peer #34320 / Trust #32122

Problem

Type::initialize() on the non-STANDALONE path still eagerly NestedJITs ProcessIdentity, gettimeofday, getrusage, net_get_interfaces, and list-unpack ABIs even when the script never calls those builtins. Call sites already ensureLinked before lookup (or invoke paths that do).

php-src reference

PHP implementation target

  • lib/JIT/Builtin/Type.php — remove eager ensureLinked for ProcessIdentityJit, StringGettimeofday, StringGetrusage, StringNetInterfacesJit, ListUnpackRuntime
  • Unit shrink test peer TypeDeadTypeInitializeLazyEnvSleepRuntimeShrinkTest

Repro

./script/aot-smoke.sh
./script/docker-exec.sh -- bash -lc './script/cold-build-check.sh'

Done when

  • Type::initialize no longer eagerly ensureLinks listed runtimes
  • getmypid/gettimeofday/getrusage/net_get_interfaces/list unpack still match Zend via call-site ensureLinked
  • ./script/aot-smoke.sh stays 8/8
  • cold-build-check ok
  • No new runtime/*.c

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:compilerCompiler / CFG / JITbugSomething isn't workingimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevEx

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions