1POSIX_TRACE_EVENTID_EQUAL(P)POSIX Programmer's ManuaPlOSIX_TRACE_EVENTID_EQUAL(P)
2
3
4

NAME

6       posix_trace_eventid_equal,                posix_trace_eventid_get_name,
7       posix_trace_trid_eventid_open - manipulate the trace event type identi‐
8       fier (TRACING)
9

SYNOPSIS

11       #include <trace.h>
12
13       int posix_trace_eventid_equal(trace_id_t trid, trace_event_id_t event1,
14              trace_event_id_t event2);
15       int posix_trace_eventid_get_name(trace_id_t trid,
16              trace_event_id_t event, char *event_name);
17
18
19       int posix_trace_trid_eventid_open(trace_id_t trid,
20              const char *restrict event_name,
21              trace_event_id_t *restrict event);
22
23

DESCRIPTION

25       The  posix_trace_eventid_equal() function shall compare the trace event
26       type identifiers event1 and event2 from the same trace  stream  or  the
27       same trace log identified by the trid argument. If the trace event type
28       identifiers event1 and event2 are from  different  trace  streams,  the
29       return value shall be unspecified.
30
31       The  posix_trace_eventid_get_name() function shall return, in the argu‐
32       ment pointed to by event_name, the trace event name associated with the
33       trace  event  type identifier identified by the argument event, for the
34       trace stream or for the trace log identified by the trid argument.  The
35       name  of the trace event shall have a maximum of {TRACE_EVENT_NAME_MAX}
36       characters (which has the minimum value {_POSIX_TRACE_EVENT_NAME_MAX}).
37       Successive  calls to this function with the same trace event type iden‐
38       tifier and the same trace stream identifier shall return the same event
39       name.
40
41       The  posix_trace_trid_eventid_open()  function  shall  associate a user
42       trace event name with a trace event type identifier for a  given  trace
43       stream.  The  trace  stream  is identified by the trid argument, and it
44       shall be an active trace stream. The trace event  name  is  the  string
45       pointed  to  by  the  argument  event_name.  It shall have a maximum of
46       {TRACE_EVENT_NAME_MAX}  characters  (which  has   the   minimum   value
47       {_POSIX_TRACE_EVENT_NAME_MAX}).  The  number  of  user trace event type
48       identifiers that can be defined for any given process is limited by the
49       maximum  value  {TRACE_USER_EVENT_MAX},  which  has  the  minimum value
50       {_POSIX_TRACE_USER_EVENT_MAX}.
51
52       If   the   Trace    Inherit    option    is    not    supported,    the
53       posix_trace_trid_eventid_open() function shall associate the user trace
54       event name pointed to by the event_name argument  with  a  trace  event
55       type  identifier  that  is  unique  for the process being traced in the
56       trace stream identified by the trid argument, and is  returned  in  the
57       variable pointed to by the event argument. If the user trace event name
58       has already been mapped for the traced  process,  then  the  previously
59       assigned  trace  event  type  identifier shall be returned. If the per-
60       process    user    trace    event    name    limit    represented    by
61       {TRACE_USER_EVENT_MAX}    has    been    reached,    the    pre-defined
62       POSIX_TRACE_UNNAMED_USEREVENT (see Trace Option:  User  Trace  Event  )
63       user trace event shall be returned.
64
65       If  the  Trace  Inherit option is supported, the posix_trace_trid_even‐
66       tid_open() function shall associate the user trace event  name  pointed
67       to  by  the event_name argument with a trace event type identifier that
68       is unique for all the processes being traced in the trace stream  iden‐
69       tified by the trid argument, and is returned in the variable pointed to
70       by the event argument. If the user trace event name  has  already  been
71       mapped  for  the  traced  processes, then the previously assigned trace
72       event type identifier shall be returned. If the per-process user  trace
73       event   name  limit  represented  by  {TRACE_USER_EVENT_MAX}  has  been
74       reached,  the  pre-defined  POSIX_TRACE_UNNAMED_USEREVENT  (see   Trace
75       Option: User Trace Event ) user trace event shall be returned.
76

RETURN VALUE

78       Upon  successful  completion,  the  posix_trace_eventid_get_name()  and
79       posix_trace_trid_eventid_open()  functions  shall  return  a  value  of
80       zero. Otherwise, they shall return the corresponding error number.
81
82       The  posix_trace_eventid_equal() function shall return a non-zero value
83       if event1 and event2 are equal; otherwise, a value  of  zero  shall  be
84       returned.  No  errors  are defined.  If either event1 or event2 are not
85       valid trace event type identifiers for the trace  stream  specified  by
86       trid or if the trid is invalid, the behavior shall be unspecified.
87
88       The posix_trace_eventid_get_name() function stores the trace event name
89       value in the object pointed to by event_name, if successful.
90
91       The posix_trace_trid_eventid_open() function  stores  the  trace  event
92       type identifier value in the object pointed to by event, if successful.
93

ERRORS

95       The    posix_trace_eventid_get_name()    and     posix_trace_trid_even‐
96       tid_open() functions shall fail if:
97
98       EINVAL The trid argument was not a valid trace stream identifier.
99
100
101       The posix_trace_trid_eventid_open() function shall fail if:
102
103       ENAMETOOLONG
104
105              The size of the name pointed to by the event_name  argument  was
106              longer      than      the      implementation-defined      value
107              {TRACE_EVENT_NAME_MAX}.
108
109
110       The posix_trace_eventid_get_name() function shall fail if:
111
112       EINVAL The trace event type identifier event was  not  associated  with
113              any name.
114
115
116       The following sections are informative.
117

EXAMPLES

119       None.
120

APPLICATION USAGE

122       None.
123

RATIONALE

125       None.
126

FUTURE DIRECTIONS

128       None.
129

SEE ALSO

131       Trace Option: User Trace Event , posix_trace_event() , posix_trace_get‐
132       next_event() , the Base  Definitions  volume  of  IEEE Std 1003.1-2001,
133       <trace.h>
134
136       Portions  of  this text are reprinted and reproduced in electronic form
137       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
138       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
139       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
140       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
141       event of any discrepancy between this version and the original IEEE and
142       The  Open Group Standard, the original IEEE and The Open Group Standard
143       is the referee document. The original Standard can be  obtained  online
144       at http://www.opengroup.org/unix/online.html .
145
146
147
148IEEE/The Open Group                  2003         POSIX_TRACE_EVENTID_EQUAL(P)
Impressum