|
| enum lttng_data_stream_info_status | lttng_data_stream_info_get_cpu_id (const struct lttng_data_stream_info *stream_info, unsigned int *cpu_id) |
| | Sets *cpu_id to the CPU ID of the data stream info stream_info.
|
| |
| enum lttng_data_stream_info_status | lttng_data_stream_info_get_memory_usage (const struct lttng_data_stream_info *stream_info, uint64_t *value) |
| | Sets *value to the current memory usage (bytes) of the data stream info stream_info.
|
| |
| enum lttng_data_stream_info_status | lttng_data_stream_info_set_get_app_bitness (const struct lttng_data_stream_info_set *set, enum lttng_app_bitness *bitness) |
| | Sets *bitness to the application bitness of the data streams of the data stream set set.
|
| |
| enum lttng_data_stream_info_status | lttng_data_stream_info_set_get_at_index (const struct lttng_data_stream_info_set *set, unsigned int index, const struct lttng_data_stream_info **stream_info) |
| | Sets *stream_info to the data stream info at the index index in the data stream info set set.
|
| |
| enum lttng_data_stream_info_status | lttng_data_stream_info_set_get_count (const struct lttng_data_stream_info_set *set, unsigned int *count) |
| | Sets *count to the number of data stream infos in the data stream info set set.
|
| |
| enum lttng_data_stream_info_status | lttng_data_stream_info_set_get_pid (const struct lttng_data_stream_info_set *set, pid_t *pid) |
| | Sets *pid to the process ID of the owner of the data streams of the data stream info set set.
|
| |
| enum lttng_data_stream_info_status | lttng_data_stream_info_set_get_uid (const struct lttng_data_stream_info_set *set, uid_t *uid) |
| | Sets *uid to the Unix user ID of the owner of the data streams of the data stream info set set.
|
| |
| void | lttng_data_stream_info_sets_destroy (const struct lttng_data_stream_info_sets *sets) |
| | Destroys the set of data stream info sets sets.
|
| |
| enum lttng_data_stream_info_status | lttng_data_stream_info_sets_get_at_index (const struct lttng_data_stream_info_sets *sets, unsigned int index, const struct lttng_data_stream_info_set **set) |
| | Sets *set to the data stream info set at the index index in the set of data stream info sets sets.
|
| |
| enum lttng_data_stream_info_status | lttng_data_stream_info_sets_get_count (const struct lttng_data_stream_info_sets *sets, unsigned int *count) |
| | Sets *count to the number of data stream info sets in the set of data stream info sets sets.
|
| |
A data stream info (lttng_data_stream_info) represents information about a single data stream of a user space channel.
The main purpose of this API is to get the CPU ID (for a per-CPU channel only) and memory usage of the data streams of a channel.
A data stream info set (lttng_data_stream_info_set) contains data stream infos that share common ownership properties (same Unix user ID, process ID, or instrumented application bitness).
A set of data stream info sets (lttng_data_stream_info_sets) groups multiple data stream info sets for a given channel.
To get CPU ID and memory usage of the data streams of a channel:
Retrieve data stream info sets for the channel with lttng_channel_get_data_stream_info_sets().
This function returns a container of snapshots of information about data streams at call time: the returned object tree is immutable.
- For each data stream info set (use lttng_data_stream_info_sets_get_at_index() (borrowed) and lttng_data_stream_info_sets_get_count()):
- Get the ID of its owning Unix user/process and its application bitness with lttng_data_stream_info_set_get_uid(), lttng_data_stream_info_set_get_pid(), and lttng_data_stream_info_set_get_app_bitness().
- For each data stream info (use lttng_data_stream_info_set_get_at_index() (borrowed) and lttng_data_stream_info_set_get_count()):
- When you're done with the data stream info sets, destroy them with lttng_data_stream_info_sets_destroy().
- Note
- The content and availability of memory usage information may vary depending on tracer support.
◆ lttng_app_bitness
Bitness of an instrumented application.
| Enumerator |
|---|
| LTTNG_APP_BITNESS_32 | 32-bit.
|
| LTTNG_APP_BITNESS_64 | 64-bit.
|
◆ lttng_data_stream_info_status
Return type for data stream info functions.
Error status enumerators have a negative value.
| Enumerator |
|---|
| LTTNG_DATA_STREAM_INFO_STATUS_OK | Success.
|
| LTTNG_DATA_STREAM_INFO_STATUS_NONE | Information not available.
|
| LTTNG_DATA_STREAM_INFO_STATUS_ERROR | Other error.
|
| LTTNG_DATA_STREAM_INFO_STATUS_INVALID_PARAMETER | Unsatisfied precondition.
|
◆ lttng_data_stream_info_get_cpu_id()
Sets *cpu_id to the CPU ID of the data stream info stream_info.
When a channel uses a per-CPU buffer ownership model, each data stream of the channel is bound to a specific CPU and therefore has a CPU ID. Otherwise, the CPU ID isn't set and this function returns LTTNG_DATA_STREAM_INFO_STATUS_NONE.
- Parameters
-
| [in] | stream_info | Data stream information from which to get the CPU ID. |
| [out] | cpu_id | On success, this function sets *cpu_id to the ID of the CPU to which the data stream of stream_info is bound. |
- Return values
-
- Precondition
stream_info is not NULL.
cpu_id is not NULL.
◆ lttng_data_stream_info_get_memory_usage()
Sets *value to the current memory usage (bytes) of the data stream info stream_info.
- Parameters
-
| [in] | stream_info | Data stream information object from which to get the memory usage. |
| [out] | value | On success, this function sets *value to the current memory usage (bytes) of stream_info. |
- Return values
-
- Precondition
stream_info is not NULL.
value is not NULL.
◆ lttng_data_stream_info_set_get_app_bitness()
Sets *bitness to the application bitness of the data streams of the data stream set set.
- Parameters
-
| [in] | set | Data stream set for which to get the application bitness. |
| [out] | bitness | On success, this function sets *bitness to the application bitness of the data streams of set. |
- Return values
-
- Precondition
set is not NULL.
bitness is not NULL.
◆ lttng_data_stream_info_set_get_at_index()
Sets *stream_info to the data stream info at the index index in the data stream info set set.
- Parameters
-
| [in] | set | Data stream info set from which to get the data stream info at the index index. |
| [in] | index | Index of the data stream info to get from set. |
| [out] | stream_info | On success, this function sets *stream_info to the data stream info at the index index in set.
*stream_info remains valid as long as set exists.
|
- Return values
-
- Precondition
-
◆ lttng_data_stream_info_set_get_count()
Sets *count to the number of data stream infos in the data stream info set set.
- Parameters
-
| [in] | set | Set of data stream info of which to get the count. |
| [out] | count | On success, this function sets *count to the number of data stream infos in set. |
- Return values
-
- Precondition
set is not NULL.
count is not NULL.
- See also
- lttng_data_stream_info_set_get_at_index() – Get a data stream info from a data stream info set by index.
◆ lttng_data_stream_info_set_get_pid()
Sets *pid to the process ID of the owner of the data streams of the data stream info set set.
If set represents per-user data streams, then the owner is a Unix user and this function returns LTTNG_DATA_STREAM_INFO_STATUS_NONE.
- Parameters
-
| [in] | set | Data stream info set of which to get the ID of the owning process. |
| [out] | pid | On success, this function sets *pid to the ID of the owning process of the data streams of set. |
- Return values
-
- Precondition
set is not NULL.
pid is not NULL.
◆ lttng_data_stream_info_set_get_uid()
Sets *uid to the Unix user ID of the owner of the data streams of the data stream info set set.
If set represents per-process data streams, then the owner is a process and this function returns LTTNG_DATA_STREAM_INFO_STATUS_NONE.
- Parameters
-
| [in] | set | Data stream info set of which to get the ID of the owning Unix user. |
| [out] | uid | On success, this function sets *uid to the ID of the Unix user owning the data streams of set. |
- Return values
-
- Precondition
set is not NULL.
uid is not NULL.
◆ lttng_data_stream_info_sets_destroy()
Destroys the set of data stream info sets sets.
- Parameters
-
| [in] | sets | Set of data stream info sets to destroy.
May be NULL.
|
◆ lttng_data_stream_info_sets_get_at_index()
Sets *set to the data stream info set at the index index in the set of data stream info sets sets.
- Parameters
-
| [in] | sets | Set of data stream info sets from which to get the data stream info set at the index index. |
| [in] | index | Index of the data stream info set to get from sets. |
| [out] | set | On success, this function sets *set to the data stream info set at the index index in sets.
*set remains valid as long as sets exists.
|
- Return values
-
- Precondition
-
◆ lttng_data_stream_info_sets_get_count()
Sets *count to the number of data stream info sets in the set of data stream info sets sets.
- Parameters
-
| [in] | sets | Set of data stream info sets of which to get the count. |
| [out] | count | On success, this function sets *count to the number of data stream info sets in sets. |
- Return values
-
- Precondition
sets is not NULL.
count is not NULL.
- See also
- lttng_data_stream_info_sets_get_at_index() – Get a data stream info set from a set of data stream info sets by index.