From effaff53656d73177e0d7b6d077c154ae925b483 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Thu, 15 Feb 2024 09:36:16 +0100 Subject: [PATCH] Nanotrace: Add connect to a tick Task-number: QDS-11952 Change-Id: I07f075c7a556fc713ef56558a7a79a6bf68f2126 Reviewed-by: Tim Jenssen --- src/libs/nanotrace/nanotracehr.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/libs/nanotrace/nanotracehr.h b/src/libs/nanotrace/nanotracehr.h index 6fe49cf3e11..36b4b87c68f 100644 --- a/src/libs/nanotrace/nanotracehr.h +++ b/src/libs/nanotrace/nanotracehr.h @@ -855,6 +855,10 @@ public: void tick(ArgumentType, Arguments &&...) {} + template + void tick(const FlowTokenType &, ArgumentType, Arguments &&...) + {} + template FlowTokenType tickWithFlow(ArgumentType, Arguments &&...) { @@ -961,6 +965,19 @@ public: } } + template + void tick(const FlowTokenType &flowToken, ArgumentType name, Arguments &&...arguments) + { + if (m_id) { + m_category().tick('n', + m_id, + std::move(name), + flowToken.bindId(), + IsFlow::In, + std::forward(arguments)...); + } + } + template FlowTokenType tickWithFlow(ArgumentType name, Arguments &&...arguments) { @@ -1151,6 +1168,8 @@ public: m_category().tick('i', 0, name, m_bindId, IsFlow::In, std::forward(arguments)...); } + std::size_t bindId() const { return m_bindId; } + private: StringType m_name; std::size_t m_bindId = 0;