Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: jazzy support #306

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

miyakoshi-dev
Copy link
Contributor

Description

jazzy support

Related links

https://tier4.atlassian.net/browse/RT2-1803

Notes for reviewers

Pre-review checklist for the PR author

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • The PR has been properly tested.
  • The PR has been reviewed.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@miyakoshi-dev miyakoshi-dev changed the title jazzy support feat: jazzy support Oct 25, 2024
void ros_trace_rmw_publish(
const void * rmw_publisher_handle,
const void * message,
int64_t init_timestamp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the definition of ros2_tracing the variable name should be changed as follows.

Suggested change
int64_t init_timestamp
int64_t timestamp

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variable name changed

@@ -43,6 +43,22 @@ TRACEPOINT_EVENT(
)
)

#ifdef ROS_DISTRO_JAZZY
TRACEPOINT_EVENT(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the definition of ros2_tracing the variable name should be changed init_timestamp to timestamp
https://github.com/ros2/ros2_tracing/blob/jazzy/tracetools/include/tracetools/tracetools.h#L283

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variable name changed

Comment on lines 379 to 380
const std::string executor_type_name = "single_threaded_executor";

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Comment on lines 364 to 367
#ifdef DEBUG_OUTPUT
// std::cerr << "callback_group_to_executor_entity_collector," << obj << "," << group_addr <<
// std::endl;
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The information in this line is useful and should not be commented out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enabled

return;
}

const std::string executor_type_name = "single_threaded_executor";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Comment on lines +300 to +320
/// @brief Store data for callback_group_to_executor_entity_collector trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template <typename... Args>
bool store_callback_group_to_executor_entity_collector(Args... args)
{
return callback_group_to_executor_entity_collector_->store(args...);
}

/// @brief Store data for executor_entity_collector_to_executor trace points.
/// @tparam ...Args Data types to be stored.
/// @param ...args Data to be stored.
/// @return True, data was stored to pending set.
/// @return False, data was stored to set.
template <typename... Args>
bool store_executor_entity_collector_to_executor(Args... args)
{
return executor_entity_collector_to_executor_->store(args...);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may need to be a conditional compilation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conditional compilation applied

Comment on lines 659 to 668

/// @brief Check whether recording function for callback_group_to_executor_entity_collector trace
/// point is assigned.
/// @return True if function is assigned, false otherwise.
bool is_assigned_callback_group_to_executor_entity_collector() const;

/// @brief Check whether recording function for executor_entity_collector_to_executor trace point
/// is assigned.
/// @return True if function is assigned, false otherwise.
bool is_assigned_executor_entity_collector_to_executor() const;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may need to be a conditional compilation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conditional compilation applied

Comment on lines 541 to 550
/// @brief Assign recording function for callback_group_to_executor_entity_collector trace points.
/// @param record recording function.
void assign_callback_group_to_executor_entity_collector(
CallbackGroupToExecutorEntityCollector::StdFuncT record);

/// @brief Assign recording function for executor_entity_collector_to_executor trace points.
/// @param record recording function.
void assign_executor_entity_collector_to_executor(
ExecutorEntityCollectorToExecutor::StdFuncT record);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may need to be a conditional compilation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conditional compilation applied

Comment on lines +758 to +760
std::shared_ptr<CallbackGroupToExecutorEntityCollector::KeysT>
callback_group_to_executor_entity_collector_;
std::shared_ptr<ExecutorEntityCollectorToExecutor::KeysT> executor_entity_collector_to_executor_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may need to be a conditional compilation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conditional compilation applied

return;
}

if (trace_filter_is_rcl_publish_recorded) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following is one of the suggestions for implementation improvement.
I don't think it's necessary to include this in the current PR, but I'll leave it as text for reference.


Until now, we've been determining whether to apply the filter for rmw_publish (=dds_write) based on the presence or absence of rcl_publish records.
However, from jazzy onwards, we can obtain rmw_publish.
Using rmw_publish for filtering might enable a more appropriate implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no particular corrections made to this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants