Ability to whitelist/blacklist functions from JIT
Personne n'a encore pris cette issue.
- Langage dominant
- C
- Étoiles
- 40.4k
- Forks
- 8.2k
- Merge moyen
- 2 j 13 h
- PR mergées (30 j)
- 96
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
L’issue ne nomme aucun fichier, test ou point d’entrée de php-src ; commencez par localiser l’implémentation de JIT et ses mécanismes existants de configuration ou de contrôle. Le comportement demandé est une proposition de conception visant à activer ou désactiver sélectivement la compilation JIT ; une API définie d’un commun accord et des tests d’acceptation seraient donc nécessaires avant de pouvoir considérer l’implémentation comme terminée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- c, php
- Domaine
- compilers, performance
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 20/100