From: Jonathan Rajotte Date: Tue, 30 Mar 2021 01:43:12 +0000 (-0400) Subject: Move firing policy from lttng_trigger to lttng_action X-Git-Tag: v2.13.0-rc1~88 X-Git-Url: https://git.liburcu.org/?a=commitdiff_plain;h=e45dd625d3e802d8e6e2ec3de180c73546e8f9fe;hp=e45dd625d3e802d8e6e2ec3de180c73546e8f9fe;p=lttng-tools.git Move firing policy from lttng_trigger to lttng_action After some reflection on the future of the importance of the trigger feature and the centralization we wish to carry around it, it is required that the notion of firing policy be moved from the trigger object to each action object of a trigger. This is necessary since we plan on introducing tracer side actions, such as increment value of map. Controlling the firing policy on the tracer side is not an easy thing to do since for UST tracing a lot a synchronizations must take place and also we must define the behaviour when multiple apps are present. Hence, we need a way to ensure that we are not painting ourself in a corner. The middle ground that was chosen was to move the notion of firing policy to the action object level. This allows us to scope the concept to the action and decide for each type if firing policy can be supported and, as needed, define the behaviour per action type. Essentially this patch perform the complete transition. It removes the notion of firing policy at the trigger level and exposes the firing policy of each action type if applicable. CLI ====== For the `add-trigger` command the change essentially boils down to moving the `--fire-every` and `--fire-once-after` from a top-level parsing to the parsing of each actions. Yes, for now all actions supports the `--fire-*` options but it will not be the case in the future. A side effect of this is that a user could decide to have different firing policy for each actions, but this also mean that if a user want to apply the same firing policy across actions, the user needs to specify it for each actions. This could be solved in the future as the trigger feature matures and that common ground are found in the behaviour or implementation of the actions (tracer side action, async action, sync actions etc.) such that "syntactic sugar" options emerge. As for the `list-trigger`, we move the firing policy printing to each actions. Tests have been updated to reflect the changes. Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau Change-Id: Ib29d4319922096c0c4b3f00782f3bbefb17e2f40 ---