Babeltrace 2 C API 2.1.0
Open-source trace manipulation framework
Loading...
Searching...
No Matches
clock-class.h
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
5 */
6
7#ifndef BABELTRACE2_TRACE_IR_CLOCK_CLASS_H
8#define BABELTRACE2_TRACE_IR_CLOCK_CLASS_H
9
10/* IWYU pragma: private, include <babeltrace2/babeltrace.h> */
11
12#ifndef __BT_IN_BABELTRACE_H
13# error "Please include <babeltrace2/babeltrace.h> instead."
14#endif
15
16#include <stdint.h>
17
18#include <babeltrace2/types.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
450 __BT_NOEXCEPT;
451
486 uint64_t frequency) __BT_NOEXCEPT;
487
506 const bt_clock_class *clock_class) __BT_NOEXCEPT;
507
534 int64_t offset_seconds, uint64_t offset_cycles) __BT_NOEXCEPT;
535
560extern void bt_clock_class_get_offset(const bt_clock_class *clock_class,
561 int64_t *offset_seconds, uint64_t *offset_cycles) __BT_NOEXCEPT;
562
582 uint64_t precision) __BT_NOEXCEPT;
583
612 const bt_clock_class *clock_class) __BT_NOEXCEPT;
613
645 const struct bt_clock_class *clock_class,
646 uint64_t *precision) __BT_NOEXCEPT;
647
670 uint64_t accuracy) __BT_NOEXCEPT;
671
703 const struct bt_clock_class *clock_class,
704 uint64_t *accuracy) __BT_NOEXCEPT;
705
742 bt_bool origin_is_unix_epoch) __BT_NOEXCEPT;
743
766extern void
768
793extern void
795
815
871 bt_clock_class *clock_class, const char *ns, const char *name,
872 const char *uid) __BT_NOEXCEPT;
873
905 const bt_clock_class *clock_class) __BT_NOEXCEPT;
906
936 const bt_clock_class *clock_class) __BT_NOEXCEPT;
937
975 const bt_clock_class *clock_class) __BT_NOEXCEPT;
976
1017 const bt_clock_class *clock_class) __BT_NOEXCEPT;
1018
1059 const bt_clock_class *clock_class) __BT_NOEXCEPT;
1060
1080
1109 bt_clock_class *clock_class, const char *ns) __BT_NOEXCEPT;
1110
1140 const bt_clock_class *clock_class) __BT_NOEXCEPT;
1141
1159
1185 bt_clock_class *clock_class, const char *name) __BT_NOEXCEPT;
1186
1211extern const char *bt_clock_class_get_name(
1212 const bt_clock_class *clock_class) __BT_NOEXCEPT;
1213
1233
1263 bt_clock_class *clock_class, const char *uid) __BT_NOEXCEPT;
1264
1292extern const char *
1293bt_clock_class_get_uid(const bt_clock_class *clock_class) __BT_NOEXCEPT;
1294
1327 const bt_clock_class *clock_class_a,
1328 const bt_clock_class *clock_class_b) __BT_NOEXCEPT;
1329
1347
1375 bt_uuid uuid) __BT_NOEXCEPT;
1376
1408 const bt_clock_class *clock_class) __BT_NOEXCEPT;
1409
1435 bt_clock_class *clock_class, const char *description)
1436 __BT_NOEXCEPT;
1437
1464 const bt_clock_class *clock_class) __BT_NOEXCEPT;
1465
1496 bt_clock_class *clock_class, const bt_value *user_attributes)
1497 __BT_NOEXCEPT;
1498
1525 bt_clock_class *clock_class) __BT_NOEXCEPT;
1526
1535 const bt_clock_class *clock_class) __BT_NOEXCEPT;
1536
1565 const bt_clock_class *clock_class) __BT_NOEXCEPT;
1566
1591
1644 const bt_clock_class *clock_class,
1645 uint64_t value, int64_t *ns_from_origin) __BT_NOEXCEPT;
1646
1670 const bt_clock_class *clock_class) __BT_NOEXCEPT;
1671
1688 const bt_clock_class *clock_class) __BT_NOEXCEPT;
1689
1704#define BT_CLOCK_CLASS_PUT_REF_AND_RESET(_clock_class) \
1705 do { \
1706 bt_clock_class_put_ref(_clock_class); \
1707 (_clock_class) = NULL; \
1708 } while (0)
1709
1735#define BT_CLOCK_CLASS_MOVE_REF(_dst, _src) \
1736 do { \
1737 bt_clock_class_put_ref(_dst); \
1738 (_dst) = (_src); \
1739 (_src) = NULL; \
1740 } while (0)
1741
1746#ifdef __cplusplus
1747}
1748#endif
1749
1750#endif /* BABELTRACE2_TRACE_IR_CLOCK_CLASS_H */
uint8_t const * bt_uuid
A UUID, that is, an array of&#160;16&#160;constant bytes.
Definition types.h:144
bt_property_availability
Availability of an object property.
Definition types.h:159
int bt_bool
Babeltrace&#160;2 boolean type.
Definition types.h:126
struct bt_self_component bt_self_component
Self component.
Definition types.h:71
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.
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_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.
uint64_t bt_clock_class_get_frequency(const bt_clock_class *clock_class)
Returns the frequency (Hz) of the clock class clock_class.
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_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.
bt_clock_class_set_namespace_status
Status codes for bt_clock_class_set_namespace().
Definition clock-class.h:1067
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.
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.
struct bt_clock_class bt_clock_class
Clock class.
Definition types.h:22
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.
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.
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.
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_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.
bt_uuid bt_clock_class_get_uuid(const bt_clock_class *clock_class)
Returns the UUID of the clock class clock_class.
const char * bt_clock_class_get_namespace(const bt_clock_class *clock_class)
Returns the namespace of the clock class clock_class.
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.
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.
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.
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 contai...
bt_clock_class_set_name_status
Status codes for bt_clock_class_set_name().
Definition clock-class.h:1146
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.
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.
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.
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_name(const bt_clock_class *clock_class)
Returns the name 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.
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 c...
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).
const char * bt_clock_class_get_uid(const bt_clock_class *clock_class)
Returns the UID of the clock class clock_class.
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_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.
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.
uint64_t bt_clock_class_get_precision(const bt_clock_class *clock_class)
Returns the precision (cycles) of the clock class clock_class.
bt_clock_class_set_description_status
Status codes for bt_clock_class_set_description().
Definition clock-class.h:1334
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_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.
bt_clock_class_cycles_to_ns_from_origin_status
Status codes for bt_clock_class_cycles_to_ns_from_origin().
Definition clock-class.h:1578
void bt_clock_class_put_ref(const bt_clock_class *clock_class)
Decrements the reference count of the clock class clock_class.
bt_clock_class_set_uid_status
Status codes for bt_clock_class_set_uid().
Definition clock-class.h:1220
bt_clock_class * bt_clock_class_create(bt_self_component *self_component)
Creates a default clock class from the self component self_component.
bt_value * bt_clock_class_borrow_user_attributes(bt_clock_class *clock_class)
Borrows the user attributes of the clock class clock_class.
bt_clock_class_set_origin_status
Status codes for bt_clock_class_set_origin().
Definition clock-class.h:802
@ BT_CLOCK_CLASS_SET_NAMESPACE_STATUS_MEMORY_ERROR
Out of memory.
Definition clock-class.h:1078
@ BT_CLOCK_CLASS_SET_NAMESPACE_STATUS_OK
Success.
Definition clock-class.h:1072
@ BT_CLOCK_CLASS_SET_NAME_STATUS_MEMORY_ERROR
Out of memory.
Definition clock-class.h:1157
@ BT_CLOCK_CLASS_SET_NAME_STATUS_OK
Success.
Definition clock-class.h:1151
@ BT_CLOCK_CLASS_SET_DESCRIPTION_STATUS_OK
Success.
Definition clock-class.h:1339
@ BT_CLOCK_CLASS_SET_DESCRIPTION_STATUS_MEMORY_ERROR
Out of memory.
Definition clock-class.h:1345
@ BT_CLOCK_CLASS_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OK
Success.
Definition clock-class.h:1583
@ BT_CLOCK_CLASS_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OVERFLOW_ERROR
Integer overflow while computing the result.
Definition clock-class.h:1589
@ BT_CLOCK_CLASS_SET_UID_STATUS_MEMORY_ERROR
Out of memory.
Definition clock-class.h:1231
@ BT_CLOCK_CLASS_SET_UID_STATUS_OK
Success.
Definition clock-class.h:1225
@ BT_CLOCK_CLASS_SET_ORIGIN_STATUS_MEMORY_ERROR
Out of memory.
Definition clock-class.h:813
@ BT_CLOCK_CLASS_SET_ORIGIN_STATUS_OK
Success.
Definition clock-class.h:807
struct bt_value bt_value
Value.
Definition types.h:93