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 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 // Provide fake header guard for cpplint
16 #undef TRACETOOLS__TP_CALL_H_
17 #ifndef TRACETOOLS__TP_CALL_H_
18 #define TRACETOOLS__TP_CALL_H_
19 
20 #undef TRACEPOINT_PROVIDER
21 #define TRACEPOINT_PROVIDER ros2
22 
23 #undef TRACEPOINT_INCLUDE
24 #define TRACEPOINT_INCLUDE "tracetools/tp_call.h"
25 
26 #if !defined(_TRACETOOLS__TP_CALL_H_) || defined(TRACEPOINT_HEADER_MULTI_READ)
27 #define _TRACETOOLS__TP_CALL_H_
28 
29 #include <lttng/tracepoint.h>
30 
31 #include <stdint.h>
32 #include <stdbool.h>
33 
36  rcl_init,
37  TP_ARGS(
38  const void *, context_handle_arg
39  ),
40  TP_FIELDS(
41  ctf_integer_hex(const void *, context_handle, context_handle_arg)
42  ctf_string(version, tracetools_VERSION)
43  )
44 )
45 
49  TP_ARGS(
50  const void *, node_handle_arg,
51  const void *, rmw_handle_arg,
52  const char *, node_name_arg,
53  const char *, namespace_arg
54  ),
55  TP_FIELDS(
56  ctf_integer_hex(const void *, node_handle, node_handle_arg)
57  ctf_integer_hex(const void *, rmw_handle, rmw_handle_arg)
58  ctf_string(node_name, node_name_arg)
59  ctf_string(namespace, namespace_arg)
60  )
61 )
62 
66  TP_ARGS(
67  const void *, publisher_handle_arg,
68  const void *, node_handle_arg,
69  const void *, rmw_publisher_handle_arg,
70  const char *, topic_name_arg,
71  const size_t, queue_depth_arg
72  ),
73  TP_FIELDS(
74  ctf_integer_hex(const void *, publisher_handle, publisher_handle_arg)
75  ctf_integer_hex(const void *, node_handle, node_handle_arg)
76  ctf_integer_hex(const void *, rmw_publisher_handle, rmw_publisher_handle_arg)
77  ctf_string(topic_name, topic_name_arg)
78  ctf_integer(const size_t, queue_depth, queue_depth_arg)
79  )
80 )
81 
85  TP_ARGS(
86  const void *, subscription_handle_arg,
87  const void *, node_handle_arg,
88  const void *, rmw_subscription_handle_arg,
89  const char *, topic_name_arg,
90  const size_t, queue_depth_arg
91  ),
92  TP_FIELDS(
93  ctf_integer_hex(const void *, subscription_handle, subscription_handle_arg)
94  ctf_integer_hex(const void *, node_handle, node_handle_arg)
95  ctf_integer_hex(const void *, rmw_subscription_handle, rmw_subscription_handle_arg)
96  ctf_string(topic_name, topic_name_arg)
97  ctf_integer(const size_t, queue_depth, queue_depth_arg)
98  )
99 )
100 
104  TP_ARGS(
105  const void *, subscription_handle_arg,
106  const void *, subscription_arg
107  ),
108  TP_FIELDS(
109  ctf_integer_hex(const void *, subscription_handle, subscription_handle_arg)
110  ctf_integer_hex(const void *, subscription, subscription_arg)
111  )
112 )
113 
117  TP_ARGS(
118  const void *, subscription_arg,
119  const void *, callback_arg
120  ),
121  TP_FIELDS(
122  ctf_integer_hex(const void *, subscription, subscription_arg)
123  ctf_integer_hex(const void *, callback, callback_arg)
124  )
125 )
126 
130  TP_ARGS(
131  const void *, service_handle_arg,
132  const void *, node_handle_arg,
133  const void *, rmw_service_handle_arg,
134  const char *, service_name_arg
135  ),
136  TP_FIELDS(
137  ctf_integer_hex(const void *, service_handle, service_handle_arg)
138  ctf_integer_hex(const void *, node_handle, node_handle_arg)
139  ctf_integer_hex(const void *, rmw_service_handle, rmw_service_handle_arg)
140  ctf_string(service_name, service_name_arg)
141  )
142 )
143 
147  TP_ARGS(
148  const void *, service_handle_arg,
149  const void *, callback_arg
150  ),
151  TP_FIELDS(
152  ctf_integer_hex(const void *, service_handle, service_handle_arg)
153  ctf_integer_hex(const void *, callback, callback_arg)
154  )
155 )
156 
160  TP_ARGS(
161  const void *, client_handle_arg,
162  const void *, node_handle_arg,
163  const void *, rmw_client_handle_arg,
164  const char *, service_name_arg
165  ),
166  TP_FIELDS(
167  ctf_integer_hex(const void *, client_handle, client_handle_arg)
168  ctf_integer_hex(const void *, node_handle, node_handle_arg)
169  ctf_integer_hex(const void *, rmw_client_handle, rmw_client_handle_arg)
170  ctf_string(service_name, service_name_arg)
171  )
172 )
173 
177  TP_ARGS(
178  const void *, timer_handle_arg,
179  int64_t, period_arg
180  ),
181  TP_FIELDS(
182  ctf_integer_hex(const void *, timer_handle, timer_handle_arg)
183  ctf_integer(int64_t, period, period_arg)
184  )
185 )
186 
190  TP_ARGS(
191  const void *, timer_handle_arg,
192  const void *, callback_arg
193  ),
194  TP_FIELDS(
195  ctf_integer_hex(const void *, timer_handle, timer_handle_arg)
196  ctf_integer_hex(const void *, callback, callback_arg)
197  )
198 )
199 
203  TP_ARGS(
204  const void *, callback_arg,
205  const char *, symbol_arg
206  ),
207  TP_FIELDS(
208  ctf_integer_hex(const void *, callback, callback_arg)
209  ctf_string(symbol, symbol_arg)
210  )
211 )
212 
216  TP_ARGS(
217  const void *, callback_arg,
218  const bool, is_intra_process_arg
219  ),
220  TP_FIELDS(
221  ctf_integer_hex(const void *, callback, callback_arg)
222  ctf_integer(int, is_intra_process, (is_intra_process_arg ? 1 : 0))
223  )
224 )
225 
229  TP_ARGS(
230  const void *, callback_arg
231  ),
232  TP_FIELDS(
233  ctf_integer_hex(const void *, callback, callback_arg)
234  )
235 )
236 
237 #endif // _TRACETOOLS__TP_CALL_H_
238 
239 #include <lttng/tracepoint-event.h>
240 
241 #endif // TRACETOOLS__TP_CALL_H_
rcl_subscription_init
rcl_subscription_init
Definition: tp_call.h:84
rclcpp_timer_callback_added
rclcpp_timer_callback_added
Definition: tp_call.h:189
rcl_timer_init
rcl_timer_init
Definition: tp_call.h:176
rclcpp_subscription_init
rclcpp_subscription_init
Definition: tp_call.h:103
rclcpp_subscription_callback_added
rclcpp_subscription_callback_added
Definition: tp_call.h:116
rcl_client_init
rcl_client_init
Definition: tp_call.h:159
rclcpp_callback_register
rclcpp_callback_register
Definition: tp_call.h:202
TRACEPOINT_PROVIDER
#define TRACEPOINT_PROVIDER
Definition: tp_call.h:21
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:228
rcl_node_init
rcl_node_init
Definition: tp_call.h:48
rcl_service_init
rcl_service_init
Definition: tp_call.h:129
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:65
TP_ARGS
TP_ARGS(const void *, node_handle_arg, const void *, rmw_handle_arg, const char *, node_name_arg, const char *, namespace_arg)
callback_start
callback_start
Definition: tp_call.h:215
rclcpp_service_callback_added
rclcpp_service_callback_added
Definition: tp_call.h:146