
  -spec erlang:trace_info(PidPortFuncEvent, Item) -> Res
                             when
                                 PidPortFuncEvent ::
                                     pid() |
                                     port() |
                                     new | new_processes | new_ports |
                                     {Module, Function, Arity} |
                                     on_load | send | 'receive',
                                 Module :: module(),
                                 Function :: atom(),
                                 Arity :: arity(),
                                 Item ::
                                     flags | tracer | traced |
                                     match_spec | meta | meta_match_spec |
                                     call_count | call_time | all,
                                 Res :: trace_info_return().

  Types:
    -type match_variable() :: atom().
      Approximation of '$1' | '$2' | '$3' | ...
    -type trace_info_flag() ::
          send | 'receive' | set_on_spawn | call | return_to | procs |
          set_on_first_spawn | set_on_link | running |
          garbage_collection | timestamp | monotonic_timestamp |
          strict_monotonic_timestamp | arity.
    -type trace_info_item_result() ::
          {traced, global | local | false | undefined} |
          {match_spec, trace_match_spec() | false | undefined} |
          {meta, pid() | port() | false | undefined | []} |
          {meta, module(), term()} |
          {meta_match_spec, trace_match_spec() | false | undefined} |
          {call_count, non_neg_integer() | boolean() | undefined} |
          {call_time,
           [{pid(),
             non_neg_integer(),
             non_neg_integer(),
             non_neg_integer()}] |
           boolean() |
           undefined}.
    -type trace_info_return() ::
          undefined |
          {flags, [trace_info_flag()]} |
          {tracer, pid() | port() | []} |
          {tracer, module(), term()} |
          trace_info_item_result() |
          {all, [trace_info_item_result()] | false | undefined}.
    -type trace_match_spec() ::
          [{[term()] | '_' | match_variable(), [term()], [term()]}].

  Returns trace information about a port, process, function, or
  event.

  To get information about a port or process, PidPortFuncEvent is
  to be a process identifier (pid), port identifier, or one of the
  atoms new, new_processes, or new_ports. The atom new or 
  new_processes means that the default trace state for processes to
  be created is returned. The atom new_ports means that the
  default trace state for ports to be created is returned.

  Valid Items for ports and processes:

  flags:
    Returns a list of atoms indicating what kind of traces is
    enabled for the process. The list is empty if no traces are
    enabled, and one or more of the following atoms if traces are
    enabled: send, 'receive', set_on_spawn, call, 
    return_to, procs, ports, set_on_first_spawn, 
    set_on_link, running, running_procs, running_ports, 
    silent, exiting, monotonic_timestamp, 
    strict_monotonic_timestamp, garbage_collection, timestamp,
    and arity. The order is arbitrary.

  tracer:
    Returns the identifier for process, port, or a tuple
    containing the tracer module and tracer state tracing this
    process. If this process is not traced, the return value is 
    [].

  To get information about a function, PidPortFuncEvent is to be
  the three-element tuple {Module, Function, Arity} or the atom 
  on_load. No wildcards are allowed. Returns undefined if the
  function does not exist, or false if the function is not traced.
  If PidPortFuncEvent is on_load, the information returned
  refers to the default value for code that will be loaded.

  Valid Items for functions:

  traced:
    Returns global if this function is traced on global function
    calls, local if this function is traced on local function
    calls (that is, local and global function calls), and false
    if local or global function calls are not traced.

  match_spec:
    Returns the match specification for this function, if it has
    one. If the function is locally or globally traced but has no
    match specification defined, the returned value is [].

  meta:
    Returns the meta-trace tracer process, port, or trace module
    for this function, if it has one. If the function is not
    meta-traced, the returned value is false. If the function is
    meta-traced but has once detected that the tracer process is
    invalid, the returned value is [].

  meta_match_spec:
    Returns the meta-trace match specification for this function,
    if it has one. If the function is meta-traced but has no match
    specification defined, the returned value is [].

  call_count:
    Returns the call count value for this function or true for
    the pseudo function on_load if call count tracing is active.
    Otherwise false is returned.

    See also erlang:trace_pattern/3.

  call_time:
    Returns the call time values for this function or true for
    the pseudo function on_load if call time tracing is active.
    Otherwise false is returned. The call time values returned, 
    [{Pid, Count, S, Us}], is a list of each process that
    executed the function and its specific counters.

    See also erlang:trace_pattern/3.

  all:
    Returns a list containing the {Item, Value} tuples for all
    other items, or returns false if no tracing is active for
    this function.

  To get information about an event, PidPortFuncEvent is to be
  one of the atoms send or 'receive'.

  One valid Item for events exists:

  match_spec:
    Returns the match specification for this event, if it has one,
    or true if no match specification has been set.

  The return value is {Item, Value}, where Value is the
  requested information as described earlier. If a pid for a dead
  process was specified, or the name of a non-existing function, 
  Value is undefined.
