# Module debug

- Description
- Function Index
- Function Details

Methods for (interactive) debugging.

Copyright © 2014 Zuse Institute Berlin

Version: $Id$

Authors: Nico Kruber (`kruber@zib.de`).

## Description

Methods for (interactive) debugging.

## Function Index

dump/0 | Returns a list of all currently executed functions and the number of instances for each of them.
dump2/0 | Returns information about all processes' memory usage.
dump3/0 | Returns various data about all processes.
dumpX/1 | Returns various data about all processes.
dumpX/2 | Returns various data about all processes.
get_round_trip/2 | Simple round-trip benchmark to an arbitrary gen_component.
rr_count_old_replicas/2 |
topDumpX/1 | Convenience wrapper to topDumpX/3.
topDumpX/3 | Gets the number of reductions for each process within the next Seconds and dumps some process data defined by Keys (sorted by the number of reductions).
topDumpXEvery/3 | Convenience wrapper to topDumpXEvery/5.
topDumpXEvery/5 | Calls topDumpX/3 every Seconds and prints the top Subset processes with the highest number of reductions.
topDumpXEvery_helper/4 | Helper function for topDumpXEvery/5 (export needed for timer:apply_after/4).

## Function Details

### get_round_trip/2

    get_round_trip(GPid :: comm:mypid(), Iterations :: pos_integer()) ->
                      float()

Simple round-trip benchmark to an arbitrary gen_component.

### dump/0

    dump() -> [{Fun :: mfa(), FunExecCount :: pos_integer()}]

Returns a list of all currently executed functions and the number of instances for each of them.

### dump2/0

    dump2() -> [{PID :: pid(), [pos_integer() | mfa() | any()]}]

Returns information about all processes' memory usage.

### dump3/0

    dump3() ->
             [{PID :: pid(),
               [Mem |
                MsgQLength |
                StackSize |
                HeapSize |
                Messages |
                Fun]}]

-     Mem = non_neg_integer()

-     MsgQLength = non_neg_integer()

-     StackSize = non_neg_integer()

-     HeapSize = non_neg_integer()

-     Messages = [atom()]

-     Fun = mfa()

Returns various data about all processes.

### dumpX/1

    dumpX(ItemInfo :: [ItemInfo :: atom(), ...]) -> [tuple(), ...]

Returns various data about all processes.

### dumpX/2

    dumpX(ItemInfo :: [ItemInfo :: atom(), ...],
          ValueFun :: fun((atom(), term()) -> term())) ->
             [tuple(), ...]

Returns various data about all processes.

### topDumpX/1

    topDumpX(Keys :: Keys | Seconds | ValueFun) ->
                [{pid(), [Reductions | RegName | term(), ...]}, ...]

-     Keys = [ItemInfo :: atom()]

-     Seconds = pos_integer()

-     ValueFun = fun((atom(), term()) -> term())

-     Reductions = non_neg_integer()

-     RegName = atom()

Convenience wrapper to topDumpX/3.

### topDumpX/3

    topDumpX(Keys, ValueFun, Seconds) ->
                [{pid(), [Reductions | RegName | term(), ...]}, ...]

-     Keys = [ItemInfo :: atom()]

-     Seconds = pos_integer()

-     ValueFun = fun((atom(), term()) -> term())

-     Reductions = non_neg_integer()

-     RegName = atom()

Gets the number of reductions for each process within the next Seconds and dumps some process data defined by Keys (sorted by the number of reductions).

### topDumpXEvery/3

    topDumpXEvery(Keys :: Keys | Seconds | ValueFun,
                  Subset :: pos_integer(),
                  StopAfter :: pos_integer()) ->
                     timer:tref()

-     Keys = [ItemInfo :: atom()]

-     Seconds = pos_integer()

-     ValueFun = fun((atom(), term()) -> term())

Convenience wrapper to topDumpXEvery/5.

### topDumpXEvery/5

    topDumpXEvery(Keys,
                  ValueFun,
                  Seconds,
                  Subset :: pos_integer(),
                  StopAfter :: pos_integer()) ->
                     timer:tref()

-     Keys = [ItemInfo :: atom()]

-     Seconds = pos_integer()

-     ValueFun = fun((atom(), term()) -> term())

Calls topDumpX/3 every Seconds and prints the top Subset processes with the highest number of reductions. Stops after StopAfter seconds.

### topDumpXEvery_helper/4

    topDumpXEvery_helper(Keys,
                         ValueFun,
                         Seconds,
                         Subset :: pos_integer()) ->
                            ok

-     Keys = [ItemInfo :: atom()]

-     Seconds = pos_integer()

-     ValueFun = fun((atom(), term()) -> term())

Helper function for topDumpXEvery/5 (export needed for timer:apply_after/4).

### rr_count_old_replicas/2

    rr_count_old_replicas(Key :: rt_chord:key(),
                          Interval :: intervals:interval()) ->
                             non_neg_integer()

Generated by EDoc, Feb 29 2016, 16:12:18.