- trace = bt_stream_class_borrow_trace(stream_class);
- BT_ASSERT(trace);
- trace_cc_count = bt_trace_get_clock_class_count(trace);
- BT_ASSERT(trace_cc_count >= 0);
- cc_prio_map_cc_count =
- bt_clock_class_priority_map_get_clock_class_count(
- notif->cc_prio_map);
- BT_ASSERT(cc_prio_map_cc_count >= 0);
-
- for (cc_prio_map_cc_i = 0; cc_prio_map_cc_i < cc_prio_map_cc_count;
- cc_prio_map_cc_i++) {
- bt_bool found_in_trace = BT_FALSE;
-
- clock_class =
- bt_clock_class_priority_map_get_clock_class_by_index(
- notif->cc_prio_map, cc_prio_map_cc_i);
- BT_ASSERT(clock_class);
- clock_value = bt_event_get_clock_value(notif->event,
- clock_class);
- if (!clock_value) {
- BT_ASSERT_PRE_MSG("Event has no clock value for a clock class which exists in the notification's clock class priority map: "
- "notif-addr=%p, event-addr=%p, "
- "event-class-addr=%p, event-class-name=\"%s\", "
- "event-class-id=%" PRId64 ", "
- "cc-prio-map-addr=%p, "
- "clock-class-addr=%p, clock-class-name=\"%s\"",
- notif, notif->event, event_class,
- bt_event_class_get_name(event_class),
- bt_event_class_get_id(event_class),
- notif->cc_prio_map, clock_class,
- bt_clock_class_get_name(clock_class));
- is_valid = BT_FALSE;
- goto end;
- }
-
- for (trace_cc_i = 0; trace_cc_i < trace_cc_count;
- trace_cc_i++) {
- struct bt_clock_class *trace_clock_class =
- bt_trace_get_clock_class_by_index(trace,
- trace_cc_i);
-
- BT_ASSERT(trace_clock_class);
- bt_put(trace_clock_class);
-
- if (trace_clock_class == clock_class) {
- found_in_trace = BT_TRUE;
- break;
- }
- }