Skip to content

Commit

Permalink
Merge pull request #8 from lpgauth/fix_undefined
Browse files Browse the repository at this point in the history
Improve handling of {cp, undefined}
  • Loading branch information
proger committed Jan 30, 2015
2 parents 8e6f9df + 8f3729f commit d07941d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/eflame.erl
Expand Up @@ -116,6 +116,12 @@ trace_proc_stream({trace_ts, _Ps, call, MFA, {cp, {_,_,_} = CallerMFA}, Ts}, #du
trace_proc_stream({trace_ts, _Ps, call, MFA, {cp, undefined}, Ts}, #dump{stack=[]} = State) ->
new_state(State, [MFA], Ts);

trace_proc_stream({trace_ts, _Ps, call, MFA, {cp, undefined}, Ts}, #dump{stack=[MFA|_] = Stack} = State) ->
new_state(State, Stack, Ts);

trace_proc_stream({trace_ts, _Ps, call, MFA, {cp, undefined}, Ts}, #dump{stack=Stack} = State) ->
new_state(State, [MFA | Stack], Ts);

trace_proc_stream({trace_ts, _Ps, call, MFA, {cp, MFA}, Ts}, #dump{stack=[MFA|Stack]} = State) ->
new_state(State, [MFA|Stack], Ts); % collapse tail recursion

Expand Down

0 comments on commit d07941d

Please sign in to comment.