summaryrefslogtreecommitdiff
path: root/lib/stdlib/test/shell_docs_SUITE_data/unknown_erlang_trace_info_2_func.txt
blob: eb15ee6787130c112925b0a345a97fd55ad836eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145

  -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 followings 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.