python / python/cpython

`_remote_debugging`: `RemoteUnwinder(..., jit=True)`

Abierto
#149,762 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

extension-modules topic-JIT topic-profiling type-feature
Lenguaje dominante
Python
Estrellas
77.2k
Forks
35.9k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

Feature or enhancement

Proposal:

:)

The idea here is to expose JIT internals a bit more in the Tachyon profiler.

The questions that could be answered trivially:

  • Is JIT actually used? How often?
  • Which executor is hot?
  • What change made the largest difference (diff_flamegraph), in terms of % spent in JIT? Per line?

A bit harder:

  • Which UOPs actually eat time?
  • Which stensils are good?
  • What guards or deopts are bad?
  • What is the trace shape?

The very minimal change that I'm thinking about here is just adding --jit flag (active for --jsonl and maybe for --live but it's a catnip), and adding JitInfo to ThreadInfo.

That's how it could look:

JitInfo(
  executor_id,
  flags
)

This will requires extending debug offsets, obviously.

We could potentially expose native_pc, native_offset, uop_index, exit_index etc. The question would be how to expose metadata for it without balooning JitInfo, and how far we can get without blocking and native unwinding. :)

I'm pretty much open to any other ideas.

There will be definitely some performance impact (more VM reads), but hidden behind the --enable-experimental-jit flag should be bearable, and we could be more playful, going back and forth.

If you think it makes sense, I'd be willing to take a shot, but this will take multiple PRs.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

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

Empieza siguiendo el flujo de _remote_debugging, RemoteUnwinder(..., jit=True) y el flujo existente de ThreadInfo. Compara el comportamiento propuesto de --jit para --jsonl y posiblemente --live, y después inspecciona cómo se gestionan los offsets de depuración. El trabajo se considerará completado cuando se haya definido el alcance para exponer JitInfo y sus metadatos detrás de --enable-experimental-jit, teniendo en cuenta el impacto en el rendimiento.

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

Evaluación

Stack tecnológico
python
Área
devtools, performance
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Tranquilo
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.