#include <common/buffer-view.h>
#include <common/dynamic-buffer.h>
#include <common/error.h>
#include <common/buffer-view.h>
#include <common/dynamic-buffer.h>
#include <common/error.h>
static bool lttng_rate_policy_once_after_n_should_execute(
const struct lttng_rate_policy *policy, uint64_t counter);
static bool lttng_rate_policy_once_after_n_should_execute(
const struct lttng_rate_policy *policy, uint64_t counter);
void lttng_rate_policy_init(struct lttng_rate_policy *rate_policy,
enum lttng_rate_policy_type type,
rate_policy_serialize_cb serialize,
void lttng_rate_policy_init(struct lttng_rate_policy *rate_policy,
enum lttng_rate_policy_type type,
rate_policy_serialize_cb serialize,
int lttng_rate_policy_serialize(struct lttng_rate_policy *rate_policy,
struct lttng_payload *payload)
{
int lttng_rate_policy_serialize(struct lttng_rate_policy *rate_policy,
struct lttng_payload *payload)
{
ssize_t lttng_rate_policy_create_from_payload(struct lttng_payload_view *view,
struct lttng_rate_policy **rate_policy)
{
ssize_t lttng_rate_policy_create_from_payload(struct lttng_payload_view *view,
struct lttng_rate_policy **rate_policy)
{
bool lttng_rate_policy_is_equal(const struct lttng_rate_policy *a,
const struct lttng_rate_policy *b)
{
bool lttng_rate_policy_is_equal(const struct lttng_rate_policy *a,
const struct lttng_rate_policy *b)
{
bool lttng_rate_policy_should_execute(
const struct lttng_rate_policy *policy, uint64_t counter)
{
bool lttng_rate_policy_should_execute(
const struct lttng_rate_policy *policy, uint64_t counter)
{
static struct lttng_rate_policy_every_n *rate_policy_every_n_from_rate_policy(
struct lttng_rate_policy *policy)
{
static struct lttng_rate_policy_every_n *rate_policy_every_n_from_rate_policy(
struct lttng_rate_policy *policy)
{
every_n_policy = rate_policy_every_n_from_rate_policy(policy);
comm.interval = every_n_policy->interval;
every_n_policy = rate_policy_every_n_from_rate_policy(policy);
comm.interval = every_n_policy->interval;
enum lttng_rate_policy_status lttng_rate_policy_every_n_get_interval(
const struct lttng_rate_policy *policy, uint64_t *interval)
{
enum lttng_rate_policy_status lttng_rate_policy_every_n_get_interval(
const struct lttng_rate_policy *policy, uint64_t *interval)
{
const struct lttng_rate_policy *policy, uint64_t counter)
{
const struct lttng_rate_policy_every_n *every_n_policy;
const struct lttng_rate_policy *policy, uint64_t counter)
{
const struct lttng_rate_policy_every_n *every_n_policy;
static struct lttng_rate_policy_once_after_n *
rate_policy_once_after_n_from_rate_policy(struct lttng_rate_policy *policy)
{
static struct lttng_rate_policy_once_after_n *
rate_policy_once_after_n_from_rate_policy(struct lttng_rate_policy *policy)
{
struct lttng_rate_policy_once_after_n *once_after_n_policy;
struct lttng_rate_policy_once_after_n_comm comm = {};
struct lttng_rate_policy_once_after_n *once_after_n_policy;
struct lttng_rate_policy_once_after_n_comm comm = {};
once_after_n_policy = rate_policy_once_after_n_from_rate_policy(policy);
comm.threshold = once_after_n_policy->threshold;
once_after_n_policy = rate_policy_once_after_n_from_rate_policy(policy);
comm.threshold = once_after_n_policy->threshold;
enum lttng_error_code ret_code;
const struct lttng_rate_policy_once_after_n *once_after_n_policy = NULL;
enum lttng_error_code ret_code;
const struct lttng_rate_policy_once_after_n *once_after_n_policy = NULL;
enum lttng_rate_policy_status lttng_rate_policy_once_after_n_get_threshold(
const struct lttng_rate_policy *policy, uint64_t *threshold)
{
enum lttng_rate_policy_status lttng_rate_policy_once_after_n_get_threshold(
const struct lttng_rate_policy *policy, uint64_t *threshold)
{
enum lttng_error_code lttng_rate_policy_mi_serialize(
const struct lttng_rate_policy *rate_policy,
struct mi_writer *writer)
enum lttng_error_code lttng_rate_policy_mi_serialize(
const struct lttng_rate_policy *rate_policy,
struct mi_writer *writer)