Babeltrace 2 C API 2.1.0
Open-source trace manipulation framework
|
Class of stream clocks.
A clock class is the class of stream clocks.
A clock class is a trace IR metadata object.
Stream clocks only exist conceptually in Babeltrace 2 because they're stateful objects. Messages cannot refer to stateful objects because they must not change while being transported from one component to the other.
Instead of having a stream clock object, messages have a default clock snapshot: this is a snapshot of the value of the default clock of a stream (a clock class instance):
In the illustration above, notice that:
Each message (objects in blue stream rectangles) created for a given stream has a default clock snapshot (yellow star): this is a snapshot of the default clock of the stream.
In other words, a default clock snapshot contains the value of the default clock of the stream when this message occurred.
The default clock class property of a stream class is optional: if a stream class has no default clock class, then its instances (streams) have no default clock, therefore all the messages created from this stream have no default clock snapshot.
A clock class is a shared object: get a new reference with bt_clock_class_get_ref() and put an existing reference with bt_clock_class_put_ref().
Some library functions freeze clock classes on success. The documentation of those functions indicate this postcondition.
The type of a clock class is bt_clock_class.
Create a default clock class from a self component with bt_clock_class_create().
Since Babeltrace 2.1, get the effective Message Interchange Protocol version of the trace processing graph containing the component from which a clock class was created with bt_clock_class_get_graph_mip_version().
The value of a stream clock (a conceptual instance of a clock class) is in cycles. This value is always positive and is relative to the offset of the clock, which is itself relative to its origin.
The origin of a clock is one of, depending on its class:
Unknown.
Two stream clocks of which the classes have an unknown origin only have a correlation if they share the same identity.
Check whether or not two clock classes share the same identity with bt_clock_class_has_same_identity().
The Unix epoch.
All stream clocks with a Unix epoch origin, whatever their identity, have a correlation.
The namespace, name, and unique identifier (UID) tuple returned by bt_clock_class_get_origin_namespace(), bt_clock_class_get_origin_name(), and bt_clock_class_get_origin_uid().
All stream clocks with the same custom origin, whatever their identity, have a correlation.
Check whether or not two clock classes share the same identity with bt_clock_class_has_same_identity().
To compute an effective stream clock value, in cycles from its origin:
Because typical tracer clocks have a high frequency (often 1 GHz and more), an effective stream clock value (cycles since Unix epoch, for example) can be larger than UINT64_MAX
. This is why a clock class has two offset properties (one in seconds and one in cycles): to make it possible for a stream clock to have smaller values, relative to this offset.
The bt_clock_class_cycles_to_ns_from_origin(), bt_util_clock_cycles_to_ns_from_origin(), and bt_clock_snapshot_get_ns_from_origin() functions convert a stream clock value (cycles) to an equivalent nanoseconds from origin value using the relevant clock class properties (frequency and offset).
Those functions perform this computation:
The following illustration shows the possible scenarios:
The "offset in seconds" property of the clock can be negative. For example, considering:
Then the computed value is −7.5 seconds from origin, or −7,500,000,000 nanoseconds from origin.
A clock class has the following properties:
Frequency of the clock class instances (stream clocks) (cycles/second).
Use bt_clock_class_set_frequency() and bt_clock_class_get_frequency().
Offset in seconds relative to the origin of the clock class instances (stream clocks), and offset in cycles relative to the offset in seconds.
The values of the clock class instances are relative to the computed offset.
Use bt_clock_class_set_offset() and bt_clock_class_get_offset().
Precision of the clock class instance (stream clocks) values (cycles).
For example, considering a precision of 7 cycles, an accuracy of 0 cycles, and the stream clock value 42 cycles, the real stream clock value can be anything between 35 cycles and 49 cycles.
Use bt_clock_class_set_precision() and bt_clock_class_get_opt_precision().
Accuracy of the clock class instance (stream clocks) values (cycles).
For example, considering an accuracy of 7 cycles, a precision of 0 cycles, and the stream clock value 42 cycles, the real stream clock value can be anything between 35 cycles and 49 cycles.
Use bt_clock_class_set_accuracy() and bt_clock_class_get_accuracy().
Origin of the clock class instances (stream clocks).
Depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:
Use bt_clock_class_set_origin_unknown() and bt_clock_class_origin_is_known().
Identity of the clock class instances (stream clocks).
Depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:
The name and UUID property pair.
A valid identity only requires the UUID property.
Use bt_clock_class_set_name(), bt_clock_class_get_name(), bt_clock_class_set_uuid(), and bt_clock_class_get_uuid().
The namespace, name, and UID property tuple.
A valid identity only requires the name and UID properties.
Use bt_clock_class_set_namespace(), bt_clock_class_get_namespace(), bt_clock_class_set_name(), bt_clock_class_get_name(), bt_clock_class_set_uid(), and bt_clock_class_get_uid().
Description of the clock class.
Use bt_clock_class_set_description() and bt_clock_class_get_description().
User attributes of the clock class.
User attributes are custom attributes attached to a clock class.
Use bt_clock_class_set_user_attributes(), bt_clock_class_borrow_user_attributes(), and bt_clock_class_borrow_user_attributes_const().
Properties | |
enum | bt_clock_class_set_origin_status { BT_CLOCK_CLASS_SET_ORIGIN_STATUS_OK , BT_CLOCK_CLASS_SET_ORIGIN_STATUS_MEMORY_ERROR } |
Status codes for bt_clock_class_set_origin(). More... | |
enum | bt_clock_class_set_namespace_status { BT_CLOCK_CLASS_SET_NAMESPACE_STATUS_OK , BT_CLOCK_CLASS_SET_NAMESPACE_STATUS_MEMORY_ERROR } |
Status codes for bt_clock_class_set_namespace(). More... | |
enum | bt_clock_class_set_name_status { BT_CLOCK_CLASS_SET_NAME_STATUS_OK , BT_CLOCK_CLASS_SET_NAME_STATUS_MEMORY_ERROR } |
Status codes for bt_clock_class_set_name(). More... | |
enum | bt_clock_class_set_uid_status { BT_CLOCK_CLASS_SET_UID_STATUS_OK , BT_CLOCK_CLASS_SET_UID_STATUS_MEMORY_ERROR } |
Status codes for bt_clock_class_set_uid(). More... | |
enum | bt_clock_class_set_description_status { BT_CLOCK_CLASS_SET_DESCRIPTION_STATUS_OK , BT_CLOCK_CLASS_SET_DESCRIPTION_STATUS_MEMORY_ERROR } |
Status codes for bt_clock_class_set_description(). More... | |
typedef enum bt_clock_class_set_origin_status | bt_clock_class_set_origin_status |
Status codes for bt_clock_class_set_origin(). | |
typedef enum bt_clock_class_set_namespace_status | bt_clock_class_set_namespace_status |
Status codes for bt_clock_class_set_namespace(). | |
typedef enum bt_clock_class_set_name_status | bt_clock_class_set_name_status |
Status codes for bt_clock_class_set_name(). | |
typedef enum bt_clock_class_set_uid_status | bt_clock_class_set_uid_status |
Status codes for bt_clock_class_set_uid(). | |
typedef enum bt_clock_class_set_description_status | bt_clock_class_set_description_status |
Status codes for bt_clock_class_set_description(). | |
void | bt_clock_class_set_frequency (bt_clock_class *clock_class, uint64_t frequency) |
Sets the frequency (Hz) of the clock class clock_class to frequency. | |
uint64_t | bt_clock_class_get_frequency (const bt_clock_class *clock_class) |
Returns the frequency (Hz) of the clock class clock_class. | |
void | bt_clock_class_set_offset (bt_clock_class *clock_class, int64_t offset_seconds, uint64_t offset_cycles) |
Sets the offset of the clock class clock_class to offset_seconds plus offset_cycles from its origin. | |
void | bt_clock_class_get_offset (const bt_clock_class *clock_class, int64_t *offset_seconds, uint64_t *offset_cycles) |
Returns the offsets in seconds and cycles of the clock class clock_class. | |
void | bt_clock_class_set_precision (bt_clock_class *clock_class, uint64_t precision) |
Sets the precision (cycles) of the clock class clock_class to precision. | |
uint64_t | bt_clock_class_get_precision (const bt_clock_class *clock_class) |
Returns the precision (cycles) of the clock class clock_class. | |
bt_property_availability | bt_clock_class_get_opt_precision (const struct bt_clock_class *clock_class, uint64_t *precision) |
Returns the precision of the clock class clock_class. | |
void | bt_clock_class_set_accuracy (bt_clock_class *clock_class, uint64_t accuracy) |
Sets the accuracy (cycles) of the clock class clock_class to accuracy. | |
bt_property_availability | bt_clock_class_get_accuracy (const struct bt_clock_class *clock_class, uint64_t *accuracy) |
Returns the accuracy of the clock class clock_class. | |
void | bt_clock_class_set_origin_is_unix_epoch (bt_clock_class *clock_class, bt_bool origin_is_unix_epoch) |
Sets whether the origin of the clock class clock_class is unknown or the Unix epoch. | |
void | bt_clock_class_set_origin_unknown (bt_clock_class *clock_class) |
Makes the origin of the clock class clock_class unknown. | |
void | bt_clock_class_set_origin_unix_epoch (bt_clock_class *clock_class) |
Makes the origin of the clock class clock_class the Unix epoch. | |
bt_clock_class_set_origin_status | bt_clock_class_set_origin (bt_clock_class *clock_class, const char *ns, const char *name, const char *uid) |
Sets the custom origin of the clock class clock_class to the ns, name, and uid tuple. | |
bt_bool | bt_clock_class_origin_is_known (const bt_clock_class *clock_class) |
Returns whether or not the origin of the clock class clock_class is known. | |
bt_bool | bt_clock_class_origin_is_unix_epoch (const bt_clock_class *clock_class) |
Returns whether or not the origin of the clock class clock_class is the Unix epoch. | |
const char * | bt_clock_class_get_origin_namespace (const bt_clock_class *clock_class) |
Returns the namespace of the custom origin of the clock class clock_class. | |
const char * | bt_clock_class_get_origin_name (const bt_clock_class *clock_class) |
Returns the name of the custom origin of the clock class clock_class. | |
const char * | bt_clock_class_get_origin_uid (const bt_clock_class *clock_class) |
Returns the UID of the custom origin of the clock class clock_class. | |
bt_clock_class_set_namespace_status | bt_clock_class_set_namespace (bt_clock_class *clock_class, const char *ns) |
Sets the namespace of the clock class clock_class to a copy of ns. | |
const char * | bt_clock_class_get_namespace (const bt_clock_class *clock_class) |
Returns the namespace of the clock class clock_class. | |
bt_clock_class_set_name_status | bt_clock_class_set_name (bt_clock_class *clock_class, const char *name) |
Sets the name of the clock class clock_class to a copy of name. | |
const char * | bt_clock_class_get_name (const bt_clock_class *clock_class) |
Returns the name of the clock class clock_class. | |
bt_clock_class_set_uid_status | bt_clock_class_set_uid (bt_clock_class *clock_class, const char *uid) |
Sets the unique identifier (UID) of the clock class clock_class to a copy of uid. | |
const char * | bt_clock_class_get_uid (const bt_clock_class *clock_class) |
Returns the UID of the clock class clock_class. | |
bt_bool | bt_clock_class_has_same_identity (const bt_clock_class *clock_class_a, const bt_clock_class *clock_class_b) |
Returns whether or not the clock classes clock_class_a and clock_class_b share the same identity. | |
void | bt_clock_class_set_uuid (bt_clock_class *clock_class, bt_uuid uuid) |
Sets the UUID of the clock class clock_class to a copy of uuid. | |
bt_uuid | bt_clock_class_get_uuid (const bt_clock_class *clock_class) |
Returns the UUID of the clock class clock_class. | |
bt_clock_class_set_description_status | bt_clock_class_set_description (bt_clock_class *clock_class, const char *description) |
Sets the description of the clock class clock_class to a copy of description. | |
const char * | bt_clock_class_get_description (const bt_clock_class *clock_class) |
Returns the description of the clock class clock_class. | |
void | bt_clock_class_set_user_attributes (bt_clock_class *clock_class, const bt_value *user_attributes) |
Sets the user attributes of the clock class clock_class to user_attributes. | |
bt_value * | bt_clock_class_borrow_user_attributes (bt_clock_class *clock_class) |
Borrows the user attributes of the clock class clock_class. | |
const bt_value * | bt_clock_class_borrow_user_attributes_const (const bt_clock_class *clock_class) |
Borrows the user attributes of the clock class clock_class (const version). | |
Utilities | |
enum | bt_clock_class_cycles_to_ns_from_origin_status { BT_CLOCK_CLASS_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OK , BT_CLOCK_CLASS_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OVERFLOW_ERROR } |
Status codes for bt_clock_class_cycles_to_ns_from_origin(). More... | |
typedef enum bt_clock_class_cycles_to_ns_from_origin_status | bt_clock_class_cycles_to_ns_from_origin_status |
Status codes for bt_clock_class_cycles_to_ns_from_origin(). | |
bt_clock_class_cycles_to_ns_from_origin_status | bt_clock_class_cycles_to_ns_from_origin (const bt_clock_class *clock_class, uint64_t value, int64_t *ns_from_origin) |
Converts the stream clock value value from cycles to nanoseconds from the origin of the clock class clock_class and sets *ns_from_origin to the result. | |
Type | |
typedef struct bt_clock_class | bt_clock_class |
Clock class. | |
Creation | |
bt_clock_class * | bt_clock_class_create (bt_self_component *self_component) |
Creates a default clock class from the self component self_component. | |
Effective Message Interchange Protocol (MIP) version access | |
uint64_t | bt_clock_class_get_graph_mip_version (const bt_clock_class *clock_class) |
Returns the effective Message Interchange Protocol (MIP) version of the trace processing graph containing the component from which clock_class was created. | |
Reference count | |
void | bt_clock_class_get_ref (const bt_clock_class *clock_class) |
Increments the reference count of the clock class clock_class. | |
void | bt_clock_class_put_ref (const bt_clock_class *clock_class) |
Decrements the reference count of the clock class clock_class. | |
#define | BT_CLOCK_CLASS_PUT_REF_AND_RESET(_clock_class) |
Decrements the reference count of the clock class _clock_class, and then sets _clock_class to NULL . | |
#define | BT_CLOCK_CLASS_MOVE_REF(_dst, _src) |
Decrements the reference count of the clock class _dst, sets _dst to _src, and then sets _src to NULL . | |
Status codes for bt_clock_class_set_origin().
Status codes for bt_clock_class_set_namespace().
Status codes for bt_clock_class_set_uid().
Status codes for bt_clock_class_set_origin().
Enumerator | |
---|---|
BT_CLOCK_CLASS_SET_ORIGIN_STATUS_OK | Success. |
BT_CLOCK_CLASS_SET_ORIGIN_STATUS_MEMORY_ERROR | Out of memory. |
Status codes for bt_clock_class_set_namespace().
Enumerator | |
---|---|
BT_CLOCK_CLASS_SET_NAMESPACE_STATUS_OK | Success. |
BT_CLOCK_CLASS_SET_NAMESPACE_STATUS_MEMORY_ERROR | Out of memory. |
Status codes for bt_clock_class_set_name().
Enumerator | |
---|---|
BT_CLOCK_CLASS_SET_NAME_STATUS_OK | Success. |
BT_CLOCK_CLASS_SET_NAME_STATUS_MEMORY_ERROR | Out of memory. |
Status codes for bt_clock_class_set_uid().
Enumerator | |
---|---|
BT_CLOCK_CLASS_SET_UID_STATUS_OK | Success. |
BT_CLOCK_CLASS_SET_UID_STATUS_MEMORY_ERROR | Out of memory. |
Status codes for bt_clock_class_set_description().
Enumerator | |
---|---|
BT_CLOCK_CLASS_SET_DESCRIPTION_STATUS_OK | Success. |
BT_CLOCK_CLASS_SET_DESCRIPTION_STATUS_MEMORY_ERROR | Out of memory. |
Status codes for bt_clock_class_cycles_to_ns_from_origin().
Enumerator | |
---|---|
BT_CLOCK_CLASS_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OK | Success. |
BT_CLOCK_CLASS_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OVERFLOW_ERROR | Integer overflow while computing the result. |
#define BT_CLOCK_CLASS_PUT_REF_AND_RESET | ( | _clock_class | ) |
Decrements the reference count of the clock class _clock_class, and then sets _clock_class to NULL
.
_clock_class | Clock class of which to decrement the reference count. Can contain |
#define BT_CLOCK_CLASS_MOVE_REF | ( | _dst, | |
_src ) |
Decrements the reference count of the clock class _dst, sets _dst to _src, and then sets _src to NULL
.
This macro effectively moves a clock class reference from the expression _src to the expression _dst, putting the existing _dst reference.
_dst | Destination expression. Can contain |
_src | Source expression. Can contain |
|
extern |
Creates a default clock class from the self component self_component.
On success, the returned clock class has the following property values:
Property | Value |
---|---|
Frequency | 1 GHz |
Offset in seconds | 0 seconds |
Offset in cycles | 0 cycles |
Precision | Depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:
|
Message Interchange Protocol version 1: accuracy (available since Babeltrace 2.1) | Unknown |
Origin | Unix epoch |
Identity | None, that is, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:
|
Description | None |
User attributes | Empty map value |
[in] | self_component | Self component from which to create the default clock class. |
NULL
on memory error.NULL
.
|
extern |
Sets the frequency (Hz) of the clock class clock_class to frequency.
See the frequency property.
[in] | clock_class | Clock class of which to set the frequency to frequency. |
[in] | frequency | New frequency of clock_class. |
NULL
. UINT64_C(-1)
.
|
extern |
Returns the frequency (Hz) of the clock class clock_class.
See the frequency property.
[in] | clock_class | Clock class of which to get the frequency. |
NULL
.
|
extern |
Sets the offset of the clock class clock_class to offset_seconds plus offset_cycles from its origin.
See the offset property.
[in] | clock_class | Clock class of which to set the offset to offset_seconds and offset_cycles. |
[in] | offset_seconds | New offset in seconds of clock_class. |
[in] | offset_cycles | New offset in cycles of clock_class. |
NULL
.
|
extern |
Returns the offsets in seconds and cycles of the clock class clock_class.
See the offset property.
[in] | clock_class | Clock class of which to get the offset. |
[out] | offset_seconds | When this function returns, *offset_seconds is the offset in seconds of clock_class. |
[out] | offset_cycles | When this function returns, *offset_cycles is the offset in cycles of clock_class. |
NULL
. NULL
. NULL
.
|
extern |
Sets the precision (cycles) of the clock class clock_class to precision.
See the precision property.
[in] | clock_class | Clock class of which to set the precision to precision. |
[in] | precision | New precision of clock_class. |
NULL
.
|
extern |
Returns the precision (cycles) of the clock class clock_class.
See the precision property.
[in] | clock_class | Clock class of which to get the precision. |
NULL
.
|
extern |
Returns the precision of the clock class clock_class.
See the precision property.
[in] | clock_class | Clock class of which to get the precision. |
[out] | precision | If this function returns BT_PROPERTY_AVAILABILITY_AVAILABLE, then *precision is the precision (cycles) of clock_class. Otherwise, the precision of clock_class is unknown. |
BT_PROPERTY_AVAILABILITY_AVAILABLE | The precision of clock_class is known. |
BT_PROPERTY_AVAILABILITY_NOT_AVAILABLE | The precision of clock_class is unknown. |
NULL
. NULL
.
|
extern |
Sets the accuracy (cycles) of the clock class clock_class to accuracy.
See the accuracy property.
[in] | clock_class | Clock class of which to set the accuracy to accuracy. |
[in] | accuracy | New accuracy of clock_class. |
NULL
.
|
extern |
Returns the accuracy of the clock class clock_class.
See the accuracy property.
[in] | clock_class | Clock class of which to get the accuracy. |
[out] | accuracy | If this function returns BT_PROPERTY_AVAILABILITY_AVAILABLE, *accuracy is the accuracy (cycles) of clock_class. Otherwise, the accuracy of clock_class is unknown. |
BT_PROPERTY_AVAILABILITY_AVAILABLE | The accuracy of clock_class is known. |
BT_PROPERTY_AVAILABILITY_NOT_AVAILABLE | The accuracy of clock_class is unknown. |
NULL
. NULL
.
|
extern |
Sets whether the origin of the clock class clock_class is unknown or the Unix epoch.
See the origin property.
[in] | clock_class | Clock class of which to set whether its origin is unknown or the Unix epoch. |
[in] | origin_is_unix_epoch | One of: |
NULL
.
|
extern |
Makes the origin of the clock class clock_class unknown.
See the origin property.
[in] | clock_class | Clock class of which to make the origin unknown. |
NULL
.
|
extern |
Makes the origin of the clock class clock_class the Unix epoch.
See the origin property.
[in] | clock_class | Clock class of which to make the origin the Unix epoch. |
NULL
.
|
extern |
Sets the custom origin of the clock class clock_class to the ns, name, and uid tuple.
See the origin property.
[in] | clock_class | Clock class of which to set the origin to the ns, name, and uid tuple. |
[in] | ns | Namespace of the custom origin of clock_class (copied). Can be |
[in] | name | Name of the custom origin of clock_class (copied). |
[in] | uid | Unique identifier (UID) of the custom origin of clock_class (copied). |
BT_CLOCK_CLASS_SET_ORIGIN_STATUS_OK | Success. |
BT_CLOCK_CLASS_SET_ORIGIN_STATUS_MEMORY_ERROR | Out of memory. |
NULL
. NULL
. NULL
.
|
extern |
Returns whether or not the origin of the clock class clock_class is known.
See the origin property.
The origin of clock_class is known if it's either the Unix epoch or custom.
[in] | clock_class | Clock class of which to get whether or not its origin is known. |
NULL
.
|
extern |
Returns whether or not the origin of the clock class clock_class is the Unix epoch.
See the origin property.
[in] | clock_class | Clock class of which to get whether or not its origin is the Unix epoch. |
NULL
.
|
extern |
Returns the namespace of the custom origin of the clock class clock_class.
See the origin property.
[in] | clock_class | Clock class of which to get the custom origin namespace. |
Custom origin namespace of clock_class, or NULL
if none.
The returned pointer remains valid as long as clock_class isn't modified.
NULL
.
|
extern |
Returns the name of the custom origin of the clock class clock_class.
See the origin property.
[in] | clock_class | Clock class of which to get the custom origin name. |
Custom origin name of clock_class, or NULL
if none.
If this function doesn't return NULL
, then bt_clock_class_get_origin_uid() also doesn't return NULL
.
The returned pointer remains valid as long as clock_class isn't modified.
NULL
.
|
extern |
Returns the UID of the custom origin of the clock class clock_class.
See the origin property.
[in] | clock_class | Clock class of which to get the custom origin UID. |
Custom origin UID of clock_class, or NULL
if none.
If this function doesn't return NULL
, then bt_clock_class_get_origin_name() also doesn't return NULL
.
The returned pointer remains valid as long as clock_class isn't modified.
NULL
.
|
extern |
Sets the namespace of the clock class clock_class to a copy of ns.
See the identity property.
[in] | clock_class | Clock class of which to set the namespace to ns. |
[in] | ns | New namespace of clock_class (copied). |
BT_CLOCK_CLASS_SET_NAMESPACE_STATUS_OK | Success. |
BT_CLOCK_CLASS_SET_NAMESPACE_STATUS_MEMORY_ERROR | Out of memory. |
NULL
. NULL
.
|
extern |
Returns the namespace of the clock class clock_class.
See the identity property.
If clock_class has no namespace, then this function returns NULL
.
[in] | clock_class | Clock class of which to get the namespace. |
Namespace of clock_class, or NULL
if none.
The returned pointer remains valid as long as clock_class isn't modified.
NULL
.
|
extern |
Sets the name of the clock class clock_class to a copy of name.
See the identity property.
[in] | clock_class | Clock class of which to set the name to name. |
[in] | name | New name of clock_class (copied). |
BT_CLOCK_CLASS_SET_NAME_STATUS_OK | Success. |
BT_CLOCK_CLASS_SET_NAME_STATUS_MEMORY_ERROR | Out of memory. |
NULL
. NULL
.
|
extern |
Returns the name of the clock class clock_class.
See the identity property.
If clock_class has no name, then this function returns NULL
.
[in] | clock_class | Clock class of which to get the name. |
Name of clock_class, or NULL
if none.
The returned pointer remains valid as long as clock_class isn't modified.
NULL
.
|
extern |
Sets the unique identifier (UID) of the clock class clock_class to a copy of uid.
See the identity property.
[in] | clock_class | Clock class of which to set the UID to uid. |
[in] | uid | New UID of clock_class (copied). |
BT_CLOCK_CLASS_SET_UID_STATUS_OK | Success. |
BT_CLOCK_CLASS_SET_UID_STATUS_MEMORY_ERROR | Out of memory. |
NULL
. NULL
.
|
extern |
Returns the UID of the clock class clock_class.
See the identity property.
If clock_class has no UID, then this function returns NULL
.
[in] | clock_class | Clock class of which to get the UID. |
UID of clock_class, or NULL
if none.
The returned pointer remains valid as long as clock_class isn't modified.
NULL
.
|
extern |
Returns whether or not the clock classes clock_class_a and clock_class_b share the same identity.
See the identity property.
Two clock classes share the same identity when all the following are true:
[in] | clock_class_a | Clock class A. |
[in] | clock_class_b | Clock class B. |
NULL
. NULL
.
|
extern |
Sets the UUID of the clock class clock_class to a copy of uuid.
See the identity property.
[in] | clock_class | Clock class of which to set the UUID to uuid. |
[in] | uuid | New UUID of clock_class (copied). |
NULL
. NULL
.
|
extern |
Returns the UUID of the clock class clock_class.
See the identity property.
If clock_class has no UUID, then this function returns NULL
.
[in] | clock_class | Clock class of which to get the UUID. |
UUID of clock_class, or NULL
if none.
The returned pointer remains valid as long as clock_class isn't modified.
NULL
.
|
extern |
Sets the description of the clock class clock_class to a copy of description.
See the description property.
[in] | clock_class | Clock class of which to set the description to description. |
[in] | description | New description of clock_class (copied). |
BT_CLOCK_CLASS_SET_DESCRIPTION_STATUS_OK | Success. |
BT_CLOCK_CLASS_SET_DESCRIPTION_STATUS_MEMORY_ERROR | Out of memory. |
NULL
. NULL
.
|
extern |
Returns the description of the clock class clock_class.
See the description property.
If clock_class has no description, then this function returns NULL
.
[in] | clock_class | Clock class of which to get the description. |
Description of clock_class, or NULL
if none.
The returned pointer remains valid as long as clock_class isn't modified.
NULL
.
|
extern |
Sets the user attributes of the clock class clock_class to user_attributes.
See the user attributes property.
[in] | clock_class | Clock class of which to set the user attributes to user_attributes. |
[in] | user_attributes | New user attributes of clock_class. |
NULL
. NULL
.
|
extern |
Borrows the user attributes of the clock class clock_class.
See the user attributes property.
[in] | clock_class | Clock class from which to borrow the user attributes. |
NULL
.const
version of this function.
|
extern |
Borrows the user attributes of the clock class clock_class (const
version).
|
extern |
Returns the effective Message Interchange Protocol (MIP) version of the trace processing graph containing the component from which clock_class was created.
[in] | clock_class | Clock class of which to get the effective MIP version. |
NULL
.
|
extern |
Converts the stream clock value value from cycles to nanoseconds from the origin of the clock class clock_class and sets *ns_from_origin to the result.
This function:
The following illustration shows the possible scenarios:
This function can fail and return the BT_CLOCK_CLASS_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OVERFLOW_ERROR status code if any step of the computation process causes an integer overflow.
[in] | clock_class | Class of the stream clock. |
[in] | value | Value of the stream clock (cycles) to convert to nanoseconds from the origin of clock_class. |
[out] | ns_from_origin | On success, *ns_from_origin is value converted to nanoseconds from the origin of clock_class. |
BT_UTIL_CLOCK_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OK | Success. |
BT_UTIL_CLOCK_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OVERFLOW_ERROR | Integer overflow while computing the result. |
NULL
. NULL
.
|
extern |
Increments the reference count of the clock class clock_class.
[in] | clock_class | Clock class of which to increment the reference count. Can be |
|
extern |
Decrements the reference count of the clock class clock_class.
[in] | clock_class | Clock class of which to decrement the reference count. Can be |