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       int posix_trace_trid_eventid_open(trace_id_t trid,
24           const char *restrict event_name,
25           trace_event_id_t *restrict event);
26

DESCRIPTION

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

RETURN VALUE

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

ERRORS

98       The posix_trace_eventid_get_name() and  posix_trace_trid_eventid_open()
99       functions shall fail if:
100
101       EINVAL The trid argument was not a valid trace stream identifier.
102
103       The posix_trace_trid_eventid_open() function shall fail if:
104
105       ENAMETOOLONG
106              The  size  of the name pointed to by the event_name argument was
107              longer      than      the      implementation-defined      value
108              {TRACE_EVENT_NAME_MAX}.
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       The following sections are informative.
116

EXAMPLES

118       None.
119

APPLICATION USAGE

121       None.
122

RATIONALE

124       None.
125

FUTURE DIRECTIONS

127       The  posix_trace_eventid_equal(),  posix_trace_eventid_get_name(),  and
128       posix_trace_trid_eventid_open()  functions  may  be removed in a future
129       version.
130

SEE ALSO

132       Table 2-7, Trace Option: User Trace Event, exec, posix_trace_event(),
133       posix_trace_getnext_event()
134
135       The Base Definitions volume of POSIX.1‐2017, <trace.h>
136
138       Portions  of  this text are reprinted and reproduced in electronic form
139       from IEEE Std 1003.1-2017, Standard for Information Technology --  Por‐
140       table  Operating System Interface (POSIX), The Open Group Base Specifi‐
141       cations Issue 7, 2018 Edition, Copyright (C) 2018 by the  Institute  of
142       Electrical  and  Electronics Engineers, Inc and The Open Group.  In the
143       event of any discrepancy between this version and the original IEEE and
144       The  Open Group Standard, the original IEEE and The Open Group Standard
145       is the referee document. The original Standard can be  obtained  online
146       at http://www.opengroup.org/unix/online.html .
147
148       Any  typographical  or  formatting  errors that appear in this page are
149       most likely to have been introduced during the conversion of the source
150       files  to  man page format. To report such errors, see https://www.ker
151       nel.org/doc/man-pages/reporting_bugs.html .
152
153
154
155IEEE/The Open Group                  2017        POSIX_TRACE_EVENTID_EQUAL(3P)
Impressum