1POSIX_TRACE_EVENTID_EQUAL(3PP)OSIX Programmer's ManuPaOlSIX_TRACE_EVENTID_EQUAL(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       posix_trace_eventid_equal,                posix_trace_eventid_get_name,
13       posix_trace_trid_eventid_open - manipulate the trace event type identi‐
14       fier (TRACING)
15

SYNOPSIS

17       #include <trace.h>
18
19       int posix_trace_eventid_equal(trace_id_t trid, trace_event_id_t event1,
20              trace_event_id_t event2);
21       int posix_trace_eventid_get_name(trace_id_t trid,
22              trace_event_id_t event, char *event_name);
23
24
25       int posix_trace_trid_eventid_open(trace_id_t trid,
26              const char *restrict event_name,
27              trace_event_id_t *restrict event);
28
29

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

EXAMPLES

125       None.
126

APPLICATION USAGE

128       None.
129

RATIONALE

131       None.
132

FUTURE DIRECTIONS

134       None.
135

SEE ALSO

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