Improving trace quality by tracking "fitness" and "exit quality"
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 77.2k
- Forks
- 36k
- Métricas de merge de PRs
- Métricas de PR pendentes
Descrição
Feature or enhancement
Proposal:
The performance of the JIT depends heavily on the quality of the traces that the front-end produces. If traces are too short, very long, overlap a lot, or drop into the interpreter too often, performance suffers.
To avoid those cases of poor performance, we should track two values during tracing:
- The fitness of the current trace
- The quality of the end of the trace as a point to stop the trace.
If fitness < exit_quality we should stop the trace.
Fitness:
Fitness should:
- start high
- be reduced by branches, how much depending on the bias of branch
- be reduced (by quite a lot) by backward edges
- be reduced a small amount by each instruction (to discourage excessively long traces)
- start lower for non-branch side exits to reduce code replication
Exit quality
Exit quality should be high for:
- The starting point of the trace (very high for this)
ENTER_EXECUTORinstructions- Merge points in the control flow graph (will need the bytecode compiler to generate this data)
Exit quality should be low for:
- Specializable instructions
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
- gh-147966
- gh-148082
- gh-148089
- gh-148301
- gh-148840
- gh-148959
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece revisando os critérios de fitness e de qualidade de saída da proposta e, em seguida, examine os PRs vinculados gh-147966, gh-148082, gh-148089, gh-148301, gh-148840 e gh-148959. O trabalho estará concluído quando o tracing parar quando o fitness ficar abaixo da qualidade de saída e os comportamentos de trace, branch, backward-edge, instruction e merge-point listados estiverem cobertos.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- compilers, performance
- Tipo de issue
- Funcionalidade
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 25/100