- if (notit->prev_packet_snapshots.discarded_events == UINT64_C(-1)) {
- /*
- * We discarded events, but before (and possibly
- * including) the current packet: use this packet's time
- * range, and do not have a specific count.
- */
- beginning_raw_value = notit->snapshots.beginning_clock;
- end_raw_value = notit->snapshots.end_clock;
- } else {
- count = notit->snapshots.discarded_events -
- notit->prev_packet_snapshots.discarded_events;
- BT_ASSERT(count > 0);
- beginning_raw_value = notit->prev_packet_snapshots.end_clock;
- end_raw_value = notit->snapshots.end_clock;
- }
+ if (notit->meta.sc->discarded_events_have_default_cs) {
+ if (notit->prev_packet_snapshots.discarded_events == UINT64_C(-1)) {
+ /*
+ * We discarded events, but before (and possibly
+ * including) the current packet: use this packet's time
+ * range, and do not have a specific count.
+ */
+ beginning_raw_value = notit->snapshots.beginning_clock;
+ end_raw_value = notit->snapshots.end_clock;
+ } else {
+ beginning_raw_value = notit->prev_packet_snapshots.end_clock;
+ end_raw_value = notit->snapshots.end_clock;
+ }