Support for emitting data that allows reconstructing original stack trace frames (including inlined frames)

Aperta
#8,070 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
wasm
Ambito
compilers

Direzione di ricerca

Inizia esaminando il supporto attuale di Binaryen per source-map, la modalità DWARF e il comportamento dell’ottimizzatore wasm2wasm, quindi confronta i tre approcci ai metadati descritti nell’issue e nel relativo Binaryen issue 4814. Il risultato dovrebbe fornire un modo definito per preservare i frame inline per la decodifica offline dello stack, valutando il supporto dei browser come parte del design.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The current support for source maps does not allow decoding stack traces in a way that preserves inlined frames. This is problematic as a stack trace from production may not make too much sense if important frames are missing.

At the minimum one would want to have a way to decode production stacks offline with a tool.
Better would be if this also worked nicely in the browser (especially for a world where compile-to-js languages start using compile-to-wasm-gc and may want to do that not only for production but also development use case)

There's a few options:

  • Make use of the fact that source maps is a json format which allows emitting extra (i.e. non-specified) information in it (this is the approach of dart2js).
  • Rely on DWARF instead of source maps. Currently binaryen disables some optimizations when dwarf mode is enabled. It's unclear if these optimizations have to be disabled if we only care about correct inlined frames in dwarf or they are disabled due to supporting other dwarf features.
    => See also https://github.com/WebAssembly/binaryen/issues/4814
  • Have a separate, generic mechanism that allows attaching metadata to things in the wasm file (instructions, globals, ...) and ensure the wasm2wasm optimizer preserves this information.

/cc @biggs0125 @osa1

Lingua principale
WebAssembly
Stelle
8.6k
Fork
885
Merge medio
2g 1h
PR unite (30g)
70

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di WebAssembly/binaryen

Tutte le issue di WebAssembly/binaryen

Issue simili

Altre issue su Compilers

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.