Skip to content

Instantly share code, notes, and snippets.

@ircmaxell
Created April 22, 2019 13:24
Show Gist options
  • Save ircmaxell/24c01b6f8e183780a0f1f2c38fa4d8de to your computer and use it in GitHub Desktop.
Save ircmaxell/24c01b6f8e183780a0f1f2c38fa4d8de to your computer and use it in GitHub Desktop.
PHP Compiler Profiling
# php bin/profiled/jit.php -r 'echo "Hello World\n";'
Hello World
In file /compiler/bin/profiled/jit.php:
Line 4 hit 2 times.
Line 6 hit 1 times.
In file /compiler/bin/jit.php:
Line 38 hit 2 times.
In file /compiler/vendor/autoload.php:
Line 5 hit 2 times.
In file /compiler/vendor/composer/autoload_real.php:
Line 12 hit 6 times.
Line 28 hit 11 times.
Line 66 hit 40 times.
In file /compiler/vendor/pre/plugin/source/functions.php:
Line 6 hit 1 times.
Line 13 hit 3 times.
Line 16 hit 29 times.
Line 27 hit 2 times.
Line 17 hit 2 times.
Line 20 hit 7 times.
Line 14 hit 1 times.
In file /compiler/vendor/pre/plugin/source/autoload.php:
Line 19 hit 218 times.
Line 24 hit 7 times.
Line 30 hit 2 times.
Line 21 hit 8 times.
Line 31 hit 3 times.
Line 17 hit 4 times.
Line 34 hit 9 times.
Line 9 hit 2 times.
Line 22 hit 3 times.
Line 28 hit 1 times.
Line 13 hit 2 times.
In file /compiler/vendor/composer/ClassLoader.php:
Line 444 hit 562 times.
Line 384 hit 11 times.
Line 354 hit 1 times.
Line 373 hit 1 times.
Line 378 hit 2 times.
Line 383 hit 2 times.
Line 338 hit 4 times.
Line 341 hit 1 times.
Line 376 hit 1 times.
Line 379 hit 1 times.
Line 385 hit 1 times.
In file /compiler/vendor/pre/plugin/source/Parser.php:
Line 23 hit 1 times.
Line 99 hit 95 times.
In file /compiler/vendor/composer/autoload_psr4.php:
Line 5 hit 5 times.
Line 42 hit 1 times.
Line 27 hit 1 times.
Line 44 hit 1 times.
Line 23 hit 1 times.
Line 19 hit 1 times.
Line 26 hit 1 times.
Line 46 hit 2 times.
Line 9 hit 1 times.
Line 11 hit 1 times.
Line 16 hit 1 times.
In file /compiler/vendor/nikic/php-parser/lib/PhpParser/Lexer.php:
Line 360 hit 2 times.
Line 274 hit 1 times.
Line 225 hit 1 times.
Line 280 hit 1 times.
Line 75 hit 1 times.
Line 266 hit 1 times.
Line 258 hit 1 times.
In file /compiler/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php:
Line 856 hit 1 times.
Line 2251 hit 1 times.
Line 1350 hit 1 times.
Line 1308 hit 1 times.
Line 2186 hit 1 times.
In file /compiler/lib/Runtime.php:
Line 56 hit 1 times.
Line 130 hit 1 times.
Line 132 hit 1 times.
Line 128 hit 1 times.
Line 167 hit 1 times.
In file /compiler/lib/Func/Internal.php:
Line 20 hit 1 times.
In file /compiler/lib/Func.php:
Line 19 hit 1 times.
In file /compiler/lib/ModuleAbstract.php:
Line 34 hit 1 times.
In file /compiler/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php:
Line 235 hit 1 times.
Line 236 hit 1 times.
Line 284 hit 1 times.
Line 298 hit 1 times.
In file /compiler/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php:
Line 42 hit 1 times.
In file /compiler/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:
Line 111 hit 1 times.
Line 230 hit 1 times.
Line 195 hit 1 times.
In file /compiler/vendor/ircmaxell/php-cfg/lib/PHPCfg/AstVisitor/NameResolver.php:
Line 61 hit 1 times.
In file /compiler/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php:
Line 96 hit 1 times.
In file /compiler/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php:
Line 105 hit 1 times.
In file /compiler/vendor/ircmaxell/php-cfg/lib/PHPCfg/Op.php:
Line 104 hit 1 times.
Line 22 hit 1 times.
In file /compiler/vendor/ircmaxell/php-cfg/lib/PHPCfg/FuncContext.php:
Line 67 hit 1 times.
In file /compiler/vendor/ircmaxell/php-cfg/lib/PHPCfg/Parser.php:
Line 845 hit 1 times.
Line 153 hit 1 times.
Line 106 hit 1 times.
Line 1198 hit 1 times.
In file /compiler/vendor/ircmaxell/php-cfg/lib/PHPCfg/Visitor/VariableFinder.php:
Line 42 hit 1 times.
Line 50 hit 1 times.
Line 41 hit 2 times.
In file /compiler/vendor/ircmaxell/php-cfg/lib/PHPCfg/Traverser.php:
Line 117 hit 2 times.
Line 23 hit 1 times.
Line 68 hit 2 times.
In file /compiler/vendor/ircmaxell/php-cfg/lib/PHPCfg/Op/Phi.php:
Line 46 hit 1 times.
In file /compiler/vendor/ircmaxell/php-cfg/lib/PHPCfg/Visitor/Simplifier.php:
Line 222 hit 1 times.
Line 146 hit 1 times.
In file /compiler/vendor/ircmaxell/php-types/lib/PHPTypes/Type.php:
Line 361 hit 1 times.
In file /compiler/vendor/ircmaxell/php-types/lib/PHPTypes/InternalArgInfo.php:
Line 8521 hit 11 times.
Line 8545 hit 106 times.
Line 8546 hit 56 times.
Line 8550 hit 13 times.
Line 8524 hit 16 times.
Line 8525 hit 11 times.
Line 8543 hit 22 times.
Line 8520 hit 64 times.
Line 8532 hit 36 times.
Line 8551 hit 252 times.
Line 8526 hit 3 times.
Line 8527 hit 1 times.
Line 8522 hit 12 times.
Line 8557 hit 3 times.
Line 8563 hit 3 times.
Line 8559 hit 4 times.
Line 8572 hit 1 times.
Line 8560 hit 5 times.
Line 8564 hit 1 times.
Line 8577 hit 2 times.
Line 8576 hit 1 times.
Line 8573 hit 2 times.
Line 8544 hit 1 times.
Line 8574 hit 1 times.
In file /compiler/vendor/ircmaxell/php-types/lib/PHPTypes/State.php:
Line 108 hit 2 times.
In file /compiler/vendor/ircmaxell/php-types/lib/PHPTypes/TypeReconstructor.php:
Line 75 hit 1 times.
Line 129 hit 1 times.
In file /compiler/vendor/ircmaxell/php-cfg/lib/PHPCfg/Operand.php:
Line 155 hit 1 times.
In file /compiler/lib/Compiler.php:
Line 506 hit 1 times.
Line 529 hit 1 times.
In file /compiler/lib/Block.php:
Line 67 hit 1 times.
Line 54 hit 1 times.
In file /compiler/lib/VM/Optimizer/AssignOp.php:
Line 33 hit 1 times.
In file /compiler/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php:
Line 96 hit 1 times.
In file /compiler/vendor/ircmaxell/php-llvm/lib/Chooser.php:
Line 55 hit 3 times.
Line 59 hit 6149 times.
Line 61 hit 1781 times.
Line 60 hit 53 times.
Line 51 hit 1 times.
Line 57 hit 1 times.
Line 78 hit 1 times.
Line 37 hit 260 times.
In file /compiler/vendor/ircmaxell/php-llvm/ffi/llvm4.php:
Line 5250 hit 1 times.
Line 6967 hit 1 times.
Line 9082 hit 1 times.
Line 11119 hit 1 times.
Line 1587 hit 77 times.
Line 4374 hit 1 times.
Line 2118 hit 3 times.
Line 1606 hit 1 times.
Line 1602 hit 2 times.
Line 2378 hit 1 times.
Line 2782 hit 1 times.
Line 3308 hit 1 times.
Line 3425 hit 2 times.
Line 2382 hit 2 times.
Line 2177 hit 1 times.
Line 3309 hit 1 times.
Line 4010 hit 2 times.
Line 3877 hit 1 times.
Line 3986 hit 1 times.
Line 3892 hit 1 times.
Line 2156 hit 1 times.
Line 2157 hit 1 times.
Line 3631 hit 1 times.
Line 2142 hit 1 times.
Line 3876 hit 1 times.
Line 4724 hit 2 times.
Line 5150 hit 1 times.
Line 4644 hit 1 times.
Line 4709 hit 116 times.
In file /compiler/vendor/ircmaxell/php-llvm/lib/LLVMAbstract/LLVM.php:
Line 148 hit 1 times.
Line 150 hit 2 times.
In file /compiler/vendor/ircmaxell/php-llvm/lib/LLVMAbstract/TargetSet/SystemZ.php:
Line 8 hit 1 times.
In file /compiler/vendor/ircmaxell/php-llvm/lib/LLVMAbstract/Context.php:
Line 22 hit 1 times.
Line 100 hit 1 times.
In file /compiler/vendor/ircmaxell/php-llvm/lib/LLVMAbstract/Module.php:
Line 23 hit 1 times.
In file /compiler/lib/JIT/Builtin.php:
Line 22 hit 1 times.
In file /compiler/vendor/ircmaxell/php-llvm/lib/LLVMAbstract/Type/Struct.php:
Line 11 hit 1 times.
In file /compiler/vendor/ircmaxell/php-llvm/lib/Type/Struct.php:
Line 7 hit 1 times.
In file /compiler/vendor/ircmaxell/php-llvm/lib/LLVMAbstract/Type/Pointer.php:
Line 11 hit 1 times.
In file /compiler/lib/JIT/Builtin/Refcount.php:
Line 53 hit 1 times.
Line 717 hit 1 times.
In file /compiler/vendor/ircmaxell/php-llvm/lib/LLVMAbstract/Factory.php:
Line 120 hit 1 times.
Line 116 hit 1 times.
Line 122 hit 2 times.
Line 101 hit 1 times.
Line 93 hit 1 times.
Line 113 hit 1 times.
Line 110 hit 1 times.
In file /compiler/lib/JIT/Context.php:
Line 300 hit 1 times.
Line 323 hit 1 times.
Line 239 hit 1 times.
Line 289 hit 1 times.
Line 410 hit 2 times.
Line 434 hit 1 times.
In file /compiler/lib/JIT/Builtin/Type.php:
Line 22 hit 1 times.
In file /compiler/vendor/ircmaxell/php-llvm/lib/LLVMAbstract/Builder.php:
Line 100 hit 1 times.
Line 478 hit 1 times.
Line 477 hit 1 times.
Line 264 hit 1 times.
In file /compiler/vendor/ircmaxell/php-llvm/lib/LLVMAbstract/Type.php:
Line 30 hit 1 times.
Line 64 hit 1 times.
In file /compiler/vendor/ircmaxell/php-llvm/lib/LLVMAbstract/Value.php:
Line 24 hit 1 times.
In file /compiler/vendor/ircmaxell/php-cfg/lib/PHPCfg/AstVisitor/MagicStringResolver.php:
Line 62 hit 1 times.
In file /compiler/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php:
Line 100 hit 1 times.
In file /compiler/vendor/ircmaxell/php-cfg/lib/PHPCfg/Visitor/DeclarationFinder.php:
Line 66 hit 1 times.
In file /compiler/vendor/ircmaxell/php-cfg/lib/PHPCfg/Visitor/PhiResolver.php:
Line 40 hit 1 times.
In file /compiler/vendor/ircmaxell/php-cfg/lib/PHPCfg/LivenessDetector.php:
Line 66 hit 1 times.
In file /compiler/lib/JIT.php:
Line 138 hit 1 times.
In file /compiler/vendor/ircmaxell/php-llvm/lib/LLVMAbstract/Value/Global_.php:
Line 12 hit 1 times.
In file /compiler/lib/JIT/Result.php:
Line 65 hit 1 times.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment