Add missing service callback registration tracepoint (#986)
Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
This commit is contained in:
parent
9c002c65da
commit
2371923761
2 changed files with 19 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
||||||
#include "rclcpp/visibility_control.hpp"
|
#include "rclcpp/visibility_control.hpp"
|
||||||
#include "rmw/types.h"
|
#include "rmw/types.h"
|
||||||
#include "tracetools/tracetools.h"
|
#include "tracetools/tracetools.h"
|
||||||
|
#include "tracetools/utils.hpp"
|
||||||
|
|
||||||
namespace rclcpp
|
namespace rclcpp
|
||||||
{
|
{
|
||||||
|
@ -98,6 +99,21 @@ public:
|
||||||
}
|
}
|
||||||
TRACEPOINT(callback_end, (const void *)this);
|
TRACEPOINT(callback_end, (const void *)this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void register_callback_for_tracing()
|
||||||
|
{
|
||||||
|
if (shared_ptr_callback_) {
|
||||||
|
TRACEPOINT(
|
||||||
|
rclcpp_callback_register,
|
||||||
|
(const void *)this,
|
||||||
|
get_symbol(shared_ptr_callback_));
|
||||||
|
} else if (shared_ptr_with_request_header_callback_) {
|
||||||
|
TRACEPOINT(
|
||||||
|
rclcpp_callback_register,
|
||||||
|
(const void *)this,
|
||||||
|
get_symbol(shared_ptr_with_request_header_callback_));
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rclcpp
|
} // namespace rclcpp
|
||||||
|
|
|
@ -159,6 +159,7 @@ public:
|
||||||
rclcpp_service_callback_added,
|
rclcpp_service_callback_added,
|
||||||
(const void *)get_service_handle().get(),
|
(const void *)get_service_handle().get(),
|
||||||
(const void *)&any_callback_);
|
(const void *)&any_callback_);
|
||||||
|
any_callback_.register_callback_for_tracing();
|
||||||
}
|
}
|
||||||
|
|
||||||
Service(
|
Service(
|
||||||
|
@ -181,6 +182,7 @@ public:
|
||||||
rclcpp_service_callback_added,
|
rclcpp_service_callback_added,
|
||||||
(const void *)get_service_handle().get(),
|
(const void *)get_service_handle().get(),
|
||||||
(const void *)&any_callback_);
|
(const void *)&any_callback_);
|
||||||
|
any_callback_.register_callback_for_tracing();
|
||||||
}
|
}
|
||||||
|
|
||||||
Service(
|
Service(
|
||||||
|
@ -205,6 +207,7 @@ public:
|
||||||
rclcpp_service_callback_added,
|
rclcpp_service_callback_added,
|
||||||
(const void *)get_service_handle().get(),
|
(const void *)get_service_handle().get(),
|
||||||
(const void *)&any_callback_);
|
(const void *)&any_callback_);
|
||||||
|
any_callback_.register_callback_for_tracing();
|
||||||
}
|
}
|
||||||
|
|
||||||
Service() = delete;
|
Service() = delete;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue