Fix request of next ETS key after deletion of previous
authorSiraaj Khandkar <siraaj@khandkar.net>
Sun, 27 Sep 2015 23:28:00 +0000 (19:28 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Sun, 27 Sep 2015 23:28:00 +0000 (19:28 -0400)
src/beam_stats_delta.erl

index 8820d71..1e3bdfb 100644 (file)
@@ -61,11 +61,12 @@ gc(?T{erlang_process_info_reductions=Table}=T) ->
 -spec gc(t(), pid()) ->
     {}.
 gc(?T{erlang_process_info_reductions=Table}=T, Pid) ->
+    Next = ets:next(Table, Pid),
     case beam_stats_source:erlang_is_process_alive(Pid)
     of  true  -> true
     ;   false -> ets:delete(Table, Pid)
     end,
-    case ets:next(Table, Pid)
+    case Next
     of  '$end_of_table' ->
             {}
     ;   NextPid when is_pid(NextPid) ->
This page took 0.030222 seconds and 4 git commands to generate.