tracetools  master
Tracing tools and instrumentation for ROS 2
tp_call.h
Go to the documentation of this file.
1 // Copyright 2019 Robert Bosch GmbH
2 // Copyright 2020 Christophe Bedard
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 // Provide fake header guard for cpplint
17 #undef TRACETOOLS__TP_CALL_H_
18 #ifndef TRACETOOLS__TP_CALL_H_
19 #define TRACETOOLS__TP_CALL_H_
20 
21 #undef TRACEPOINT_PROVIDER
22 #define TRACEPOINT_PROVIDER ros2
23 
24 #undef TRACEPOINT_INCLUDE
25 #define TRACEPOINT_INCLUDE "tracetools/tp_call.h"
26 
27 #if !defined(_TRACETOOLS__TP_CALL_H_) || defined(TRACEPOINT_HEADER_MULTI_READ)
28 #define _TRACETOOLS__TP_CALL_H_
29 
30 #include <lttng/tracepoint.h>
31 
32 #include <stdint.h>
33 #include <stdbool.h>
34 
37  rcl_init,
38  TP_ARGS(
39  const void *, context_handle_arg
40  ),
41  TP_FIELDS(
42  ctf_integer_hex(const void *, context_handle, context_handle_arg)
43  ctf_string(version, tracetools_VERSION)
44  )
45 )
46 
50  TP_ARGS(
51  const void *, node_handle_arg,
52  const void *, rmw_handle_arg,
53  const char *, node_name_arg,
54  const char *, namespace_arg
55  ),
56  TP_FIELDS(
57  ctf_integer_hex(const void *, node_handle, node_handle_arg)
58  ctf_integer_hex(const void *, rmw_handle, rmw_handle_arg)
59  ctf_string(node_name, node_name_arg)
60  ctf_string(namespace, namespace_arg)
61  )
62 )
63 
67  TP_ARGS(
68  const void *, publisher_handle_arg,
69  const void *, node_handle_arg,
70  const void *, rmw_publisher_handle_arg,
71  const char *, topic_name_arg,
72  const size_t, queue_depth_arg
73  ),
74  TP_FIELDS(
75  ctf_integer_hex(const void *, publisher_handle, publisher_handle_arg)
76  ctf_integer_hex(const void *, node_handle, node_handle_arg)
77  ctf_integer_hex(const void *, rmw_publisher_handle, rmw_publisher_handle_arg)
78  ctf_string(topic_name, topic_name_arg)
79  ctf_integer(const size_t, queue_depth, queue_depth_arg)
80  )
81 )
82 
86  TP_ARGS(
87  const void *, publisher_handle_arg,
88  const void *, message_arg
89  ),
90  TP_FIELDS(
91  ctf_integer_hex(const void *, publisher_handle, publisher_handle_arg)
92  ctf_integer_hex(const void *, message, message_arg)
93  )
94 )
95 
99  TP_ARGS(
100  const void *, publisher_handle_arg,
101  const void *, message_arg
102  ),
103  TP_FIELDS(
104  ctf_integer_hex(const void *, publisher_handle, publisher_handle_arg)
105  ctf_integer_hex(const void *, message, message_arg)
106  )
107 )
108 
112  TP_ARGS(
113  const void *, subscription_handle_arg,
114  const void *, node_handle_arg,
115  const void *, rmw_subscription_handle_arg,
116  const char *, topic_name_arg,
117  const size_t, queue_depth_arg
118  ),
119  TP_FIELDS(
120  ctf_integer_hex(const void *, subscription_handle, subscription_handle_arg)
121  ctf_integer_hex(const void *, node_handle, node_handle_arg)
122  ctf_integer_hex(const void *, rmw_subscription_handle, rmw_subscription_handle_arg)
123  ctf_string(topic_name, topic_name_arg)
124  ctf_integer(const size_t, queue_depth, queue_depth_arg)
125  )
126 )
127 
131  TP_ARGS(
132  const void *, subscription_handle_arg,
133  const void *, subscription_arg
134  ),
135  TP_FIELDS(
136  ctf_integer_hex(const void *, subscription_handle, subscription_handle_arg)
137  ctf_integer_hex(const void *, subscription, subscription_arg)
138  )
139 )
140 
144  TP_ARGS(
145  const void *, subscription_arg,
146  const void *, callback_arg
147  ),
148  TP_FIELDS(
149  ctf_integer_hex(const void *, subscription, subscription_arg)
150  ctf_integer_hex(const void *, callback, callback_arg)
151  )
152 )
153 
157  TP_ARGS(
158  const void *, service_handle_arg,
159  const void *, node_handle_arg,
160  const void *, rmw_service_handle_arg,
161  const char *, service_name_arg
162  ),
163  TP_FIELDS(
164  ctf_integer_hex(const void *, service_handle, service_handle_arg)
165  ctf_integer_hex(const void *, node_handle, node_handle_arg)
166  ctf_integer_hex(const void *, rmw_service_handle, rmw_service_handle_arg)
167  ctf_string(service_name, service_name_arg)
168  )
169 )
170 
174  TP_ARGS(
175  const void *, service_handle_arg,
176  const void *, callback_arg
177  ),
178  TP_FIELDS(
179  ctf_integer_hex(const void *, service_handle, service_handle_arg)
180  ctf_integer_hex(const void *, callback, callback_arg)
181  )
182 )
183 
187  TP_ARGS(
188  const void *, client_handle_arg,
189  const void *, node_handle_arg,
190  const void *, rmw_client_handle_arg,
191  const char *, service_name_arg
192  ),
193  TP_FIELDS(
194  ctf_integer_hex(const void *, client_handle, client_handle_arg)
195  ctf_integer_hex(const void *, node_handle, node_handle_arg)
196  ctf_integer_hex(const void *, rmw_client_handle, rmw_client_handle_arg)
197  ctf_string(service_name, service_name_arg)
198  )
199 )
200 
204  TP_ARGS(
205  const void *, timer_handle_arg,
206  int64_t, period_arg
207  ),
208  TP_FIELDS(
209  ctf_integer_hex(const void *, timer_handle, timer_handle_arg)
210  ctf_integer(int64_t, period, period_arg)
211  )
212 )
213 
217  TP_ARGS(
218  const void *, timer_handle_arg,
219  const void *, callback_arg
220  ),
221  TP_FIELDS(
222  ctf_integer_hex(const void *, timer_handle, timer_handle_arg)
223  ctf_integer_hex(const void *, callback, callback_arg)
224  )
225 )
226 
230  TP_ARGS(
231  const void *, timer_handle_arg,
232  const void *, node_handle_arg
233  ),
234  TP_FIELDS(
235  ctf_integer_hex(const void *, timer_handle, timer_handle_arg)
236  ctf_integer_hex(const void *, node_handle, node_handle_arg)
237  )
238 )
239 
243  TP_ARGS(
244  const void *, callback_arg,
245  const char *, symbol_arg
246  ),
247  TP_FIELDS(
248  ctf_integer_hex(const void *, callback, callback_arg)
249  ctf_string(symbol, symbol_arg)
250  )
251 )
252 
256  TP_ARGS(
257  const void *, callback_arg,
258  const bool, is_intra_process_arg
259  ),
260  TP_FIELDS(
261  ctf_integer_hex(const void *, callback, callback_arg)
262  ctf_integer(int, is_intra_process, (is_intra_process_arg ? 1 : 0))
263  )
264 )
265 
269  TP_ARGS(
270  const void *, callback_arg
271  ),
272  TP_FIELDS(
273  ctf_integer_hex(const void *, callback, callback_arg)
274  )
275 )
276 
280  TP_ARGS(
281  const void *, node_handle_arg,
282  const void *, state_machine_arg
283  ),
284  TP_FIELDS(
285  ctf_integer_hex(const void *, node_handle, node_handle_arg)
286  ctf_integer_hex(const void *, state_machine, state_machine_arg)
287  )
288 )
289 
293  TP_ARGS(
294  const void *, state_machine_arg,
295  const char *, start_label_arg,
296  const char *, goal_label_arg
297  ),
298  TP_FIELDS(
299  ctf_integer_hex(const void *, state_machine, state_machine_arg)
300  ctf_string(start_label, start_label_arg)
301  ctf_string(goal_label, goal_label_arg)
302  )
303 )
304 
305 #endif // _TRACETOOLS__TP_CALL_H_
306 
307 #include <lttng/tracepoint-event.h>
308 
309 #endif // TRACETOOLS__TP_CALL_H_
rcl_subscription_init
rcl_subscription_init
Definition: tp_call.h:111
rclcpp_timer_callback_added
rclcpp_timer_callback_added
Definition: tp_call.h:216
rcl_timer_init
rcl_timer_init
Definition: tp_call.h:203
rclcpp_timer_link_node
rclcpp_timer_link_node
Definition: tp_call.h:229
rcl_lifecycle_transition
rcl_lifecycle_transition
Definition: tp_call.h:292
rcl_publish
rcl_publish
Definition: tp_call.h:85
rclcpp_subscription_init
rclcpp_subscription_init
Definition: tp_call.h:130
rclcpp_subscription_callback_added
rclcpp_subscription_callback_added
Definition: tp_call.h:143
rcl_client_init
rcl_client_init
Definition: tp_call.h:186
rclcpp_callback_register
rclcpp_callback_register
Definition: tp_call.h:242
TRACEPOINT_PROVIDER
#define TRACEPOINT_PROVIDER
Definition: tp_call.h:22
TRACEPOINT_EVENT
TRACEPOINT_EVENT(ros2, rcl_init, TP_ARGS(const void *, context_handle_arg), TP_FIELDS(ctf_integer_hex(const void *, context_handle, context_handle_arg) ctf_string(version, tracetools_VERSION))) TRACEPOINT_EVENT(ros2
callback_end
callback_end
Definition: tp_call.h:268
rcl_node_init
rcl_node_init
Definition: tp_call.h:49
rcl_service_init
rcl_service_init
Definition: tp_call.h:156
TP_FIELDS
TP_FIELDS(ctf_integer_hex(const void *, node_handle, node_handle_arg) ctf_integer_hex(const void *, rmw_handle, rmw_handle_arg) ctf_string(node_name, node_name_arg) ctf_string(namespace, namespace_arg))) TRACEPOINT_EVENT(ros2
rcl_publisher_init
rcl_publisher_init
Definition: tp_call.h:66
rclcpp_publish
rclcpp_publish
Definition: tp_call.h:98
TP_ARGS
TP_ARGS(const void *, node_handle_arg, const void *, rmw_handle_arg, const char *, node_name_arg, const char *, namespace_arg)
rcl_lifecycle_state_machine_init
rcl_lifecycle_state_machine_init
Definition: tp_call.h:279
callback_start
callback_start
Definition: tp_call.h:255
rclcpp_service_callback_added
rclcpp_service_callback_added
Definition: tp_call.h:173