php / php/php-src

Ability to whitelist/blacklist functions from JIT

Abierto
#20,458 8 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Feature Status: Needs Triage
Lenguaje dominante
C
Estrellas
40.4k
Forks
8.1k
Merge medio
2 d 13 h
PR fusionados (30 d)
96

Descripción

Description

I maintain a decent size, long-running application using PHP.

I've been very excited about the introduction of JIT into PHP before, since as a long-running, CPU-heavy application, it stands to benefit far more from JIT than the average PHP application.
However, our attempts to rollout JIT usage have been constantly thwarted by a plague of crashes and stability issues that have made it unusable for all practical purposes. This remains true as of PHP 8.4, although I will grant that the stability of the JIT does seem a lot better since the introduction of IR.

This issue is a request for some way to whitelist/blacklist code from being JITed.

For example, there is some math-heavy code in PocketMine that benefits from tracing JIT to the tune of a 5x performance improvement. It would be a probably acceptable tradeoff to enable JIT in just that one code pathway to get that huge performance improvement, since we can test that specific part of the code heavily in isolation, while avoiding it in other areas where stability is more important.

Conversely, it would make it much easier to track down JIT issues in large applications if there were some way to blacklist code from being compiled by the JIT, so that code can be A/B tested in parts in real-world conditions.

Perhaps this could take the form of #[AllowJIT] and/or #[DenyJIT] attributes on functions, but maybe there is a better way that I'm not aware of.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

El issue no menciona archivos, pruebas ni puntos de entrada de php-src; comienza por localizar la implementación de JIT y sus mecanismos existentes de configuración o control. El comportamiento solicitado es una propuesta de diseño para habilitar o deshabilitar selectivamente la compilación JIT, por lo que se necesitarían una API acordada y pruebas de aceptación antes de poder considerar terminada la implementación.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
c, php
Área
compilers, performance
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
20/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.