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
11

NAME

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

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

EXAMPLES

119       None.
120

APPLICATION USAGE

122       None.
123

RATIONALE

125       None.
126

FUTURE DIRECTIONS

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

SEE ALSO

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