Hey guys, I want to trace JavaScript function enter and exit events to generate function calling graphs just like DTrace/SystemTap could do.
e.g.
0 <- rl_getc
0 <- rl_read_key
0 -> _rl_dispatch
0 -> _rl_dispatch_subseq
0 -> rl_insert
0 -> _rl_insert_char
0 -> _rl_any_typein
0 <- _rl_any_typein
0 -> rl_insert_text
0 <- rl_insert_text
0 <- _rl_insert_char
0 <- rl_insert
0 <- _rl_dispatch_subseq
0 <- _rl_dispatch
0 -> rl_redisplay
0 -> _rl_move_cursor_relative
0 <- _rl_move_cursor_relative
0 -> _rl_output_some_chars
0 <- _rl_output_some_chars
0 <- rl_redisplay
0 <- readline_internal_char
0 -> readline_internal_char
0 -> _rl_init_argument
0 <- _rl_init_argument
0 -> rl_read_key
0 -> _rl_next_macro_key
0 <- _rl_next_macro_key
0 -> rl_getc
And I found that it's kind of easy to probe function enter, but I couldn't find a place appropriate place to probe function exit.
What I'm considering are: 1) frame destructor; 2) `Return` ignition handler.
Any advises would be appreciated! Thanks!