Skip to content

Commit 502a185

Browse files
committed
Update v3/docs/opt-trace-format.md
1 parent 9bab144 commit 502a185

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎v3/docs/opt-trace-format.md‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,9 +729,16 @@ provides a mapping from global variable names to their values.
729729
during execution. The global analogue for this field is `ordered_globals`. (I suppose this field should be named
730730
`ordered_locals`, but I haven't gotten around to renaming yet.)
731731

732+
`frame_id` is a unique integer that identifies this frame; the first executed function gets an ID of 1, and then
733+
subsequent calls get successively increasing IDs.
732734

733-
(Ignore `is_parent`, `is_zombie`, and `parent_frame_id_list` for now. We'll cover those in the more advanced
734-
"Closures and Zombie Frames" section below.)
735+
`unique_hash` is a unique string that identifies this frame. At this point, I don't remember clearly why
736+
this field is required in addition to `frame_id`, but nonetheless the frontend depends on it. A simple way
737+
to construct `unique_hash` is by concatenating the frame's function name with `frame_id`.
738+
(There's probably some subtle thing I'm forgetting at the moment, though ...)
739+
740+
Finally, ignore `is_parent`, `is_zombie`, and `parent_frame_id_list` for now. We'll cover those in the more advanced
741+
"Closures and Zombie Frames" section below.
735742

736743

737744
## Closures and Zombie Frames (advanced)

0 commit comments

Comments
 (0)