Skip to content

Commit

Permalink
Add timestamp to rmw_publish tracepoint (#74)
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Wecht <[email protected]>
  • Loading branch information
cwecht authored Jan 23, 2024
1 parent db5ef98 commit e2285f3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
6 changes: 5 additions & 1 deletion tracetools/include/tracetools/tp_call.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,14 @@ TRACEPOINT_EVENT(
TRACEPOINT_PROVIDER,
rmw_publish,
TP_ARGS(
const void *, message_arg
const void *, publisher_handle_arg,
const void *, message_arg,
int64_t, timestamp_arg
),
TP_FIELDS(
ctf_integer_hex(const void *, publisher_handle, publisher_handle_arg)
ctf_integer_hex(const void *, message, message_arg)
ctf_integer(int64_t, timestamp, timestamp_arg)
)
)

Expand Down
4 changes: 3 additions & 1 deletion tracetools/include/tracetools/tracetools.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ _DECLARE_TRACEPOINT(
*/
_DECLARE_TRACEPOINT(
rmw_publish,
const void * message)
const void * publisher_handle,
const void * message,
int64_t timestamp)

/// `rmw_subscription_init`
/**
Expand Down
8 changes: 6 additions & 2 deletions tracetools/src/tracetools.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,13 @@ DEFINE_TRACEPOINT(
DEFINE_TRACEPOINT(
rmw_publish,
TRACEPOINT_PARAMS(
const void * message),
const void * publisher_handle,
const void * message,
int64_t timestamp),
TRACEPOINT_ARGS(
message))
publisher_handle,
message,
timestamp))

DEFINE_TRACEPOINT(
rmw_subscription_init,
Expand Down

0 comments on commit e2285f3

Please sign in to comment.