+ if (fmt->convert_index_timestamp) {
+ ret = fmt->convert_index_timestamp(td);
+ if (ret < 0)
+ goto error_collection_del;
+ }
+
+ if (fmt->timestamp_begin) {
+ ret = fmt->timestamp_begin(td, handle, BT_CLOCK_REAL,
+ &handle->real_timestamp_begin);
+ if (ret < 0 && ret != -ENOENT) {
+ ret = -1;
+ goto error_collection_del;
+ }
+ }
+ if (fmt->timestamp_end) {
+ ret = fmt->timestamp_end(td, handle, BT_CLOCK_REAL,
+ &handle->real_timestamp_end);
+ if (ret < 0 && ret != -ENOENT) {
+ ret = -1;
+ goto error_collection_del;
+ }
+ }
+ if (fmt->timestamp_begin) {
+ ret = fmt->timestamp_begin(td, handle, BT_CLOCK_CYCLES,
+ &handle->cycles_timestamp_begin);
+ if (ret < 0 && ret != -ENOENT) {
+ ret = -1;
+ goto error_collection_del;
+ }
+ }
+ if (fmt->timestamp_end) {
+ ret = fmt->timestamp_end(td, handle, BT_CLOCK_CYCLES,
+ &handle->cycles_timestamp_end);
+ if (ret < 0 && ret != -ENOENT) {
+ ret = -1;
+ goto error_collection_del;
+ }
+ }
+