2 * Copyright (C) 2020 Francis Deslauriers <francis.deslauriers@efficios.com>
4 * SPDX-License-Identifier: GPL-2.0-only
10 #include <lttng/map/map.h>
11 #include <common/kernel-ctl/kernel-ctl.h>
12 #include "trace-kernel.h"
13 #include "trace-ust.h"
15 struct map_kv_ht_entry
{
16 struct lttng_ht_node_str node
;
23 enum lttng_error_code
map_kernel_add(struct ltt_kernel_session
*ksession
,
24 struct lttng_map
*map
);
25 enum lttng_error_code
map_kernel_enable(struct ltt_kernel_session
*ksession
,
26 struct ltt_kernel_map
*kmap
);
27 enum lttng_error_code
map_kernel_disable(struct ltt_kernel_session
*ksession
,
28 struct ltt_kernel_map
*kmap
);
30 int map_ust_add(struct ltt_ust_session
*usession
,
31 struct lttng_map
*map
);
32 int map_ust_enable(struct ltt_ust_session
*usess
,
33 struct ltt_ust_map
*umap
);
34 int map_ust_disable(struct ltt_ust_session
*usess
,
35 struct ltt_ust_map
*umap
);
37 void map_add_or_increment_map_values(struct lttng_ht
*map_values
, const char *key
,
38 int64_t value
, bool has_underflowed
, bool has_overflowed
);
40 int map_new_content_section(struct lttng_map_content
*map_content
,
41 enum lttng_map_key_value_pair_list_type list_type
,
42 bool summed_all_cpus
, unsigned int identifier
,
43 int cpu
, struct lttng_ht
*values
);
45 #endif /* _LTT_MAP_H */