![]() |
LTTng control library C API
|

Modules | |
| Map group API | |
| Map key API | |
| Map value API | |
Data Structures | |
| struct | lttng_map_channel |
| Map channel (opaque type). More... | |
| struct | lttng_map_channel_descriptor |
| Map channel descriptor (opaque type). More... | |
| struct | lttng_map_channel_set |
| Set of map channels (opaque type). More... | |
A map channel is an object which is responsible for a set of fixed-size, per-partition key-value stores known as maps.
A map channel is similar to a event record channel, except that, instead of containing ring buffers to record events, it contains maps which hold integer values keyed by strings (as of LTTng-tools 16.2).
Unlike a event record channel, which lives within a single tracing domain, a map channel only distinguishes Linux kernel from user space through its type: the map channel API treats every non-kernel tracing domain uniformly as user space.
To populate the maps of a map channel, add a trigger with an “increment map value” action which targets that map channel: each time the trigger fires, LTTng expands the key template of the action to obtain an effective key, and then increments the value of the corresponding map entry.
lttng-concepts(7).A map is the per-partition view of the values which a map channel keeps for a given owner, that is:
The whole system (a single, implicit owner).
Each map exposes one value per key, and the map group for the owner is the set of all such per-partition views.
As of LTTng-tools 16.2, a map channel always allocates one map per CPU per owner (equivalent to per-CPU buffering for a event record channel): the partitioning is by CPU ID. Get the partition ID of a given per-partition map values object with lttng_map_values_get_partition_id().
In addition to the per-owner, per-CPU maps which the buffer ownership model dictates, every user space map channel also carries a single, channel-wide shared map group.
The properties of a map channel are:
| Property name | Description | Access |
|---|---|---|
| Name | Identifies the map channel within its (recording session, type) pair: two map channels may share the same name provided their types differ. | Initially unset on a map channel descriptor. When unset, the session daemon automatically generates a name when you call lttng_session_add_map_channel(). |
| Type | Selects which tracing domain family the map channel belongs to (kernel vs. user space; see lttng_map_channel_type) and which type-specific accessors apply ( Within a recording session, a map channel is uniquely identified by the (type, name) pair: two map channels may share the same name provided their types differ. | Determined by the descriptor creation function (kernel vs. user space). |
| Key type | Type of the map keys of the maps which the map channel contains; see lttng_map_key_type. As of LTTng-tools 16.2, only string keys are available: every descriptor creation function bakes in LTTNG_MAP_KEY_TYPE_STRING. | Determined by the descriptor creation function (the
|
| Value type | Type of the values of the maps which the map channel contains; see lttng_map_value_type. This property is the configured value type. The effective value type, that is, the value type which LTTng actually creates for a given instrumented application or for the Linux kernel, may differ from it, following two simple rules:
As of LTTng-tools 16.2, only signed integer value types are available:
| Set at descriptor creation time through the |
| Buffer ownership model (user space map channel) | See Buffer ownership model. | Set at descriptor creation time through the |
| Maximum key count | Caps the number of distinct keys which the map channel may track, and determines the size of each contained map. When a map is full, LTTng silently drops any new key. | |
| Update policy | See Update policy. | |
| Dead group policy (user space map channel with per-process buffer ownership) | See Dead group policy. |
All the properties above are immutable once a map channel exists.
For a user space map channel, the buffer ownership model (lttng_map_channel_buffer_ownership enumerator) specifies whether each Unix user, or each process, owns its own maps:
The maps which back the channel are shared between all the instrumented applications of a given Unix user.
This is the same concept as the buffer ownership model of a event record channel, except that it applies to the backing memory of maps instead of ring buffers.
A Linux kernel map channel doesn't have a buffer ownership model: its maps are always system-wide.
The update policy of a map channel (lttng_map_channel_update_policy enumerator) controls how LTTng increments map values when multiple “event rule matches” triggers having an “increment map value” action which targets the same map channel match the same event and produce the same effective key:
LTTng increments a single map value per resulting key, regardless of how many of those triggers match.
This is similar to how LTTng writes a single event record to a given event record channel when multiple recording event rules of the map channel match the same event.
The update policy is only meaningful when an “increment map value” action increments a map value because of an “event rule matches” trigger condition, since that's the only condition type which can match the same event through more than one trigger at once.
For a trigger having any other condition type, each firing of the trigger causes a single map value increment, regardless of the update policy.
A shared map group is a user space map channel concept: a Linux kernel map channel never has one.
In addition to the per-owner map groups which the buffer ownership model dictates, every user space map channel carries a single, channel-wide shared map group: one map with no owner ID (no Unix user, no process) and no per-partition decomposition.
In the map group API, the shared map group is a map group of type LTTNG_MAP_GROUP_TYPE_SHARED. Reach it directly with lttng_map_channel_get_shared_group(), or find it within the result of lttng_map_channel_get_groups() (it always exists for a user space map channel).
The LTTng session daemon (see lttng-sessiond(8)) writes its values directly: tracers don't update the shared map group. The session daemon writes to it when the dead group policy of the map channel is LTTNG_MAP_CHANNEL_DEAD_GROUP_POLICY_SUM_INTO_SHARED and an instrumented process terminates: LTTng then accumulates the values of the dying per-process maps into the shared map group of the channel.
Because the shared map group has no per-partition decomposition, lttng_map_group_get_values() always returns a map values object set of size 1 for it, and lttng_map_values_get_partition_id() does not apply to the contained map values object.
The dead group policy of a user space map channel with the per-process buffer ownership model (lttng_map_channel_dead_group_policy enumerator) controls what LTTng does with the values of the maps of an instrumented process when this process terminates while the map channel still exists:
Discard the maps of the terminated process: their values, which the process accumulated since the start of the recording session, are lost.
For each map of the terminated process, add each value to the corresponding key of the shared map group of the map channel.
When the addition would overflow the effective value type of the map group, the result wraps around (modular arithmetic) and LTTng sets the overflow flag of the corresponding shared map value (see lttng_map_values_signed_int_has_overflow_at_index()).
The dead group policy only applies to a user space map channel whose buffer ownership model is LTTNG_MAP_CHANNEL_BUFFER_OWNERSHIP_PER_PID. A kernel map channel and a per-user user space map channel don't have a dead group policy: nothing in their data model goes away independently of the recording session itself.
The map channel operations are:
| Operation | Means |
|---|---|
| Creation |
|
| Listing | Use lttng_session_list_map_channels(), passing the type of the map channels of interest. Look up a single map channel by (type, name) pair with lttng_session_get_map_channel_by_name().
|
| Property access | Use the dedicated lttng_map_channel_get_*() and lttng_map_channel_user_get_*() functions. |
| Key access |
|
| Group access |
|
| Value reset | Resetting the values of all the maps of all the map channels of a recording session to 0, without removing the keys themselves, is part of recording session clearing.
|
| Destruction (client-side handle) | Destroy a map channel handle obtained from lttng_session_get_map_channel_by_name() with lttng_map_channel_destroy(). For map channels owned by a map channel set, call lttng_map_channel_set_destroy() instead. As of LTTng-tools 16.2, you can't remove a map channel from a recording session: it exists as long as the recording session exists. |
Buffer ownership model of a user space map channel.
See Buffer ownership model to learn more.
| Enumerator | |
|---|---|
| LTTNG_MAP_CHANNEL_BUFFER_OWNERSHIP_PER_UID | Per-user buffering. |
| LTTNG_MAP_CHANNEL_BUFFER_OWNERSHIP_PER_PID | Per-process buffering. |
Dead group policy of a user space map channel with the per-process buffer ownership model.
See Dead group policy to learn more.
| Enumerator | |
|---|---|
| LTTNG_MAP_CHANNEL_DEAD_GROUP_POLICY_DROP | Discard the maps of the terminated process. The values which the process accumulated since the start of the recording session are lost. |
| LTTNG_MAP_CHANNEL_DEAD_GROUP_POLICY_SUM_INTO_SHARED | Add each value of each map of the terminated process to the corresponding key of the shared map group of the map channel. When the addition would overflow the effective value type of the map group, the result wraps around (modular arithmetic) and LTTng sets the overflow flag of the corresponding shared map value (see lttng_map_values_signed_int_has_overflow_at_index()). |
Status code for map channel descriptor property accessors.
Status code for map channel set functions.
| Enumerator | |
|---|---|
| LTTNG_MAP_CHANNEL_SET_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_SET_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
Status code for map channel functions.
| Enumerator | |
|---|---|
| LTTNG_MAP_CHANNEL_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
| LTTNG_MAP_CHANNEL_STATUS_NOT_FOUND | No matching map group found. |
| LTTNG_MAP_CHANNEL_STATUS_ERROR | Other error. |
Type of a map channel.
| Enumerator | |
|---|---|
| LTTNG_MAP_CHANNEL_TYPE_KERNEL | Linux kernel map channel. |
| LTTNG_MAP_CHANNEL_TYPE_USER | User space map channel. |
Update policy of a map channel.
| Enumerator | |
|---|---|
| LTTNG_MAP_CHANNEL_UPDATE_POLICY_PER_EVENT | Per matching event. |
| LTTNG_MAP_CHANNEL_UPDATE_POLICY_PER_RULE_MATCH | Per event rule match. |
|
extern |
Destroys the map channel descriptor descriptor.
| [in] | descriptor | Map channel descriptor to destroy. May be |
|
extern |
Sets *max_key_count to the maximum key count property of the map channel described by descriptor.
| [in] | descriptor | Descriptor of which to get the maximum key count of the described map channel. |
| [out] | max_key_count | On success, this function sets *max_key_count to the maximum key count of the described map channel. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
descriptor is not NULL.max_key_count is not NULL.
|
extern |
Sets *name to the name of the map channel described by descriptor.
This function returns the name property of descriptor as last set with lttng_map_channel_descriptor_set_name(), or LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_UNSET when that property isn't set.
When the name property isn't set, the session daemon generates the name of the resulting map channel when you call lttng_session_add_map_channel(). That generated name is a property of the map channel itself, not of descriptor: retrieve it through lttng_map_channel_get_name() with a map channel obtained from lttng_session_list_map_channels().
| [in] | descriptor | Descriptor of the map channel of which to get the name. |
| [out] | name | On success, this function sets
|
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_UNSET | The name property of descriptor is not set. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
descriptor is not NULL.name is not NULL.
|
extern |
Sets *type to the type of the map channel described by descriptor.
The function which produced descriptor (user space vs. kernel) determines its type, which selects which type-specific accessors apply.
| [in] | descriptor | Descriptor of which to get the type of the described map channel. |
| [out] | type | On success, this function sets *type to the type of the described map channel. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
descriptor is not NULL.type is not NULL.
|
extern |
Sets *policy to the update policy property of the map channel described by descriptor.
| [in] | descriptor | Descriptor of which to get the update policy of the described map channel. |
| [out] | policy | On success, this function sets *policy to the update policy of the described map channel. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
descriptor is not NULL.policy is not NULL.
|
extern |
Sets *value_type to the value type of the map channel described by descriptor.
| [in] | descriptor | Descriptor of which to get the value type of the described map channel. |
| [out] | value_type | On success, this function sets *value_type to the value type of the described map channel. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
descriptor is not NULL.value_type is not NULL.
|
extern |
Creates a descriptor of a Linux kernel map channel whose maps have string keys and scalar values.
On success, the returned descriptor has the following initial properties:
| Property | Value | Setter |
|---|---|---|
| Name | Unset | lttng_map_channel_descriptor_set_name() |
| Type | LTTNG_MAP_CHANNEL_TYPE_KERNEL | Not applicable |
| Key type | LTTNG_MAP_KEY_TYPE_STRING | Not applicable |
| Value type | value_type | Not applicable |
| Maximum key count | 4096 | lttng_map_channel_descriptor_set_max_key_count() |
| Update policy | LTTNG_MAP_CHANNEL_UPDATE_POLICY_PER_EVENT | lttng_map_channel_descriptor_set_update_policy() |
| [in] | value_type | Value type of the map entries of the described map channel. |
Linux kernel map channel descriptor on success, or NULL on error.
Destroy the returned descriptor with lttng_map_channel_descriptor_destroy().
value_type is one of LTTNG_MAP_VALUE_TYPE_SIGNED_INT_32, LTTNG_MAP_VALUE_TYPE_SIGNED_INT_64, or LTTNG_MAP_VALUE_TYPE_SIGNED_INT_MAX.
|
extern |
Sets the maximum key count property of the map channel described by descriptor to max_key_count.
The maximum key count caps the number of distinct keys which the described map channel may track. It also determines the size of each contained map.
| [in] | descriptor | Descriptor of which to set the maximum key count of the described map channel to max_key_count. |
| [in] | max_key_count | Maximum key count property to set. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
descriptor is not NULL.max_key_count is greater than 0.
|
extern |
Sets the name of the map channel described by descriptor to a copy of name.
The name property of a map channel descriptor is initially unset. When you call lttng_session_add_map_channel() with a descriptor having no name, the session daemon automatically generates a name for the resulting map channel. The generated name is a property of the map channel itself, not of descriptor: retrieve it through lttng_map_channel_get_name() with a map channel obtained from lttng_session_list_map_channels().
| [in] | descriptor | Descriptor of which to set the name of the described map channel to a copy of name. |
| [in] | name | Name property to set (copied). |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
descriptor is not NULL.name is not NULL.
|
extern |
Sets the update policy property of the map channel described by descriptor to policy.
| [in] | descriptor | Descriptor of which to set the update policy of the described map channel to policy. |
| [in] | policy | Update policy property to set. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
descriptor is not NULL.
|
extern |
Sets *ownership_model to the buffer ownership model of the user space map channel described by descriptor.
| [in] | descriptor | Descriptor of which to get the buffer ownership model of the described user space map channel. |
| [out] | ownership_model | On success, this function sets *ownership_model to the buffer ownership model of the described map channel. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
descriptor is not NULL.descriptor.ownership_model is not NULL.
|
extern |
Sets *policy to the dead group policy property of the user space map channel described by descriptor.
| [in] | descriptor | Descriptor of which to get the dead group policy of the described user space map channel. |
| [out] | policy | On success, this function sets *policy to the dead group policy of the described map channel. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
descriptor is not NULL.descriptor.descriptor.policy is not NULL.
|
extern |
Sets the dead group policy property of the user space map channel described by descriptor to policy.
The dead group policy controls what LTTng does with the values of the maps of an instrumented process when this process terminates while the described map channel still exists. It only applies to a user space map channel whose buffer ownership model is LTTNG_MAP_CHANNEL_BUFFER_OWNERSHIP_PER_PID.
| [in] | descriptor | Descriptor of which to set the dead group policy of the described user space map channel to policy. |
| [in] | policy | Dead group policy property to set. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_DESCRIPTOR_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
descriptor is not NULL.descriptor.descriptor.
|
extern |
Creates a descriptor of a user space map channel whose maps have string keys and scalar values.
On success, the returned descriptor has the following initial properties:
| Property | Value | Setter |
|---|---|---|
| Name | Unset | lttng_map_channel_descriptor_set_name() |
| Type | LTTNG_MAP_CHANNEL_TYPE_USER | Not applicable |
| Key type | LTTNG_MAP_KEY_TYPE_STRING | Not applicable |
| Value type | value_type | Not applicable |
| Buffer ownership model | ownership_model | Not applicable |
| Maximum key count | 4096 | lttng_map_channel_descriptor_set_max_key_count() |
| Update policy | LTTNG_MAP_CHANNEL_UPDATE_POLICY_PER_EVENT | lttng_map_channel_descriptor_set_update_policy() |
| Dead group policy | LTTNG_MAP_CHANNEL_DEAD_GROUP_POLICY_SUM_INTO_SHARED | lttng_map_channel_descriptor_user_set_dead_group_policy() |
| [in] | value_type | Value type of the map entries of the described map channel. |
| [in] | ownership_model | Buffer ownership model of the described map channel. |
User space map channel descriptor on success, or NULL on error.
Destroy the returned descriptor with lttng_map_channel_descriptor_destroy().
value_type is one of LTTNG_MAP_VALUE_TYPE_SIGNED_INT_32, LTTNG_MAP_VALUE_TYPE_SIGNED_INT_64, or LTTNG_MAP_VALUE_TYPE_SIGNED_INT_MAX.
|
extern |
Destroys the map channel channel.
This function destroys the local, client-side handle on channel: it does not destroy the corresponding session daemon map channel.
Only use this function to release a map channel handle which you obtained from lttng_session_get_map_channel_by_name(). For channels owned by a map channel set, call lttng_map_channel_set_destroy() instead.
| [in] | channel | Map channel to destroy. May be |
|
extern |
Sets *groups to the map groups of channel.
*groups is a "snapshot" taken at call time: LTTng doesn't update it as map groups are added to or removed from channel afterwards.
The contents of *groups depend on the type and, for a user space map channel, the buffer ownership model of channel:
Exactly one LTTNG_MAP_GROUP_TYPE_KERNEL_GLOBAL group (the system-wide group).
A Linux kernel map channel has no shared map group: that's a user space map channel concept.
channel.channel.A user space map channel always has a shared map group (LTTNG_MAP_GROUP_TYPE_SHARED), regardless of its buffer ownership model; a Linux kernel map channel never has one. When it exists, reach it directly without iterating *groups with lttng_map_channel_get_shared_group().
Use lttng_map_group_get_type() on each member of *groups to classify it before calling type-specific accessors: lttng_map_group_user_get_owner_id() and lttng_map_group_user_get_owner_name() only apply to a map group whose type is LTTNG_MAP_GROUP_TYPE_USER_PER_USER or LTTNG_MAP_GROUP_TYPE_USER_PER_PROCESS. lttng_map_group_get_effective_value_type() applies to a map group of any type.
| [in] | channel | Map channel of which to get the map groups. |
| [out] | groups | On success, this function sets Destroy |
| LTTNG_MAP_CHANNEL_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
| LTTNG_MAP_CHANNEL_STATUS_ERROR | Other error. |
channel is not NULL.groups is not NULL.
|
extern |
Sets *keys to the current set of keys of channel.
The mapping from key to index lives at the channel level: every map (per-partition view) which channel manages exposes the same set of values at the same indices. Use *keys to enumerate the keys of channel or to look up the index of a specific key, then use that index against any lttng_map_values obtained from a map of channel.
*keys is a "snapshot" taken at call time: the connected session daemon returns the keys which channel tracks at that moment, and LTTng doesn't update *keys as keys are added to channel afterwards.
| [in] | channel | Map channel of which to get the keys. |
| [out] | keys | On success, this function sets Destroy |
| LTTNG_MAP_CHANNEL_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
channel is not NULL.keys is not NULL.
|
extern |
Sets *max_key_count to the maximum key count property of channel.
The maximum key count caps the number of distinct keys which channel may track. It also determines the size of each contained map.
| [in] | channel | Map channel of which to get the maximum key count. |
| [out] | max_key_count | On success, this function sets *max_key_count to the maximum key count of channel. |
| LTTNG_MAP_CHANNEL_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
channel is not NULL.max_key_count is not NULL.
|
extern |
Sets *name to the name of channel.
| [in] | channel | Map channel of which to get the name. |
| [out] | name | On success, this function sets
|
| LTTNG_MAP_CHANNEL_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
channel is not NULL.name is not NULL.
|
extern |
Sets *group to the shared map group of channel.
A shared map group is a user space map channel concept: a Linux kernel map channel never has one. Therefore this function only applies to a user space map channel, which has exactly one shared map group: a single, channel-wide group with no owner ID (no Unix user, no process) and no per-partition decomposition.
The type of *group is always LTTNG_MAP_GROUP_TYPE_SHARED.
The shared map group is the destination of dead-process map values when the dead group policy of channel is LTTNG_MAP_CHANNEL_DEAD_GROUP_POLICY_SUM_INTO_SHARED.
The session daemon (see lttng-sessiond(8)) may also write to it directly to record values which don't originate from a tracer.
| [in] | channel | Map channel of which to get the shared map group. |
| [out] | group | On success, this function sets Destroy |
| LTTNG_MAP_CHANNEL_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
| LTTNG_MAP_CHANNEL_STATUS_ERROR | Other error. |
channel is not NULL.channel.group is not NULL.
|
extern |
Sets *type to the type of channel.
The type of channel is fixed at configuration time and selects which type-specific accessors apply to it (lttng_map_channel_user_* vs. lttng_map_channel_kernel_* functions).
| [in] | channel | Map channel of which to get the type. |
| [out] | type | On success, this function sets *type to the type of channel. |
| LTTNG_MAP_CHANNEL_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
channel is not NULL.type is not NULL.
|
extern |
Sets *policy to the update policy property of channel.
| [in] | channel | Map channel of which to get the update policy. |
| [out] | policy | On success, this function sets *policy to the update policy of channel. |
| LTTNG_MAP_CHANNEL_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
channel is not NULL.policy is not NULL.
|
extern |
Sets *value_type to the value type of channel.
| [in] | channel | Map channel of which to get the value type. |
| [out] | value_type | On success, this function sets *value_type to the value type of channel. |
| LTTNG_MAP_CHANNEL_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
channel is not NULL.value_type is not NULL.
|
extern |
Destroys the map channel set set.
| [in] | set | Map channel set to destroy. May be |
|
extern |
Sets *channel to the map channel at index index in set.
| [in] | set | Map channel set of which to get a map channel. |
| [in] | index | Index of the map channel to get from set. |
| [out] | channel | On success, this function sets
|
| LTTNG_MAP_CHANNEL_SET_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_SET_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
set is not NULL.index is less than the number of map channels in set, as returned by lttng_map_channel_set_get_count().channel is not NULL.
|
extern |
Sets *count to the number of map channels in set.
| [in] | set | Map channel set of which to get the number of map channels. |
| [out] | count | On success, this function sets *count to the number of map channels in set. |
| LTTNG_MAP_CHANNEL_SET_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_SET_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
set is not NULL.count is not NULL.
|
extern |
Sets *ownership_model to the buffer ownership model of the user space map channel channel.
| [in] | channel | User space map channel of which to get the buffer ownership model. |
| [out] | ownership_model | On success, this function sets *ownership_model to the buffer ownership model of channel. |
| LTTNG_MAP_CHANNEL_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
channel is not NULL.channel.ownership_model is not NULL.
|
extern |
Sets *policy to the dead group policy of the user space map channel channel.
| [in] | channel | Per-process user space map channel of which to get the dead group policy. |
| [out] | policy | On success, this function sets *policy to the dead group policy of channel. |
| LTTNG_MAP_CHANNEL_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
channel is not NULL.channel.channel.policy is not NULL.
|
extern |
Sets *groups to the map groups of the user space map channel channel for the process ID pid.
Depending on the value type of channel, *groups contains one or two map groups for pid:
*groups contains a single map group.
*groups may contain up to two map groups, one of the effective value type LTTNG_MAP_VALUE_TYPE_SIGNED_INT_32 and one of the effective value type LTTNG_MAP_VALUE_TYPE_SIGNED_INT_64. | [in] | channel | Per-process user space map channel of which to get the map groups. |
| [in] | pid | Process ID of the map groups to get from channel. |
| [out] | groups | On success, this function sets Destroy |
| LTTNG_MAP_CHANNEL_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
| LTTNG_MAP_CHANNEL_STATUS_ERROR | Other error. |
channel is not NULL.channel.channel.groups is not NULL.
|
extern |
Sets *groups to the map groups of the user space map channel channel for the Unix user ID uid.
Depending on the value type of channel, *groups contains one or two map groups for uid:
*groups contains a single map group: all the instrumented applications of uid, whatever their bitness, contribute to it.
*groups may contain up to two map groups, one of the effective value type LTTNG_MAP_VALUE_TYPE_SIGNED_INT_32 and one of the effective value type LTTNG_MAP_VALUE_TYPE_SIGNED_INT_64: the instrumented applications of uid contribute to the map group of their own bitness. | [in] | channel | Per-user user space map channel of which to get the map groups. |
| [in] | uid | Unix user ID of the map groups to get from channel. |
| [out] | groups | On success, this function sets Destroy |
| LTTNG_MAP_CHANNEL_STATUS_OK | Success. |
| LTTNG_MAP_CHANNEL_STATUS_INVALID_PARAMETER | Unsatisfied precondition. |
| LTTNG_MAP_CHANNEL_STATUS_ERROR | Other error. |
channel is not NULL.channel.channel.groups is not NULL.