+
+BT_HIDDEN
+int bt_event_class_validate_single_clock_class(
+ struct bt_event_class *event_class,
+ struct bt_clock_class **expected_clock_class)
+{
+ int ret = 0;
+
+ BT_ASSERT(event_class);
+ BT_ASSERT(expected_clock_class);
+ ret = bt_validate_single_clock_class(event_class->context,
+ expected_clock_class);
+ if (ret) {
+ BT_LOGW("Event class's context field type "
+ "is not recursively mapped to the "
+ "expected clock class: "
+ "event-class-addr=%p, "
+ "event-class-name=\"%s\", "
+ "event-class-id=%" PRId64 ", "
+ "ft-addr=%p",
+ event_class,
+ bt_event_class_get_name(event_class),
+ event_class->id,
+ event_class->context);
+ goto end;
+ }
+
+ ret = bt_validate_single_clock_class(event_class->fields,
+ expected_clock_class);
+ if (ret) {
+ BT_LOGW("Event class's payload field type "
+ "is not recursively mapped to the "
+ "expected clock class: "
+ "event-class-addr=%p, "
+ "event-class-name=\"%s\", "
+ "event-class-id=%" PRId64 ", "
+ "ft-addr=%p",
+ event_class,
+ bt_event_class_get_name(event_class),
+ event_class->id,
+ event_class->fields);
+ goto end;
+ }
+
+end:
+ return ret;
+}