Last active
January 8, 2025 18:54
-
-
Save bokner/3a048454f861fc0d61acd91b76459456 to your computer and use it in GitHub Desktop.
LTTng+erlang:trace for tracing function calls/returns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1> l(dyntrace). | |
{module,dyntrace} | |
2> Match = [{'_', [], [{return_trace}]}]. %% Enable return trace for functions of any arity | |
[{'_',[],[{return_trace}]}] | |
3> erlang:trace_pattern({'_','_','_'}, Match, []). %% Trace all functions | |
2411 | |
4> erlang:trace(all, true, [call,{tracer,dyntrace,[]}]). %% Trace function calls with dyntrace (i.e. LTTng) | |
26 | |
5> erlang:now(). %% Or whatever function call you want to trace. See the traces coming in LTTng log. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment