Bug #1350 » 0002-babeltrace-fix-bug-in-stream-intersection-option.patch
formats/ctf/ctf.c | ||
---|---|---|
struct packet_index_time *_cycles)
|
||
{
|
||
int stream_id, ret = 0;
|
||
struct packet_index_time real = { 0, UINT64_MAX },
|
||
cycles = { 0, UINT64_MAX };
|
||
struct packet_index_time real = { INT64_MIN, INT64_MAX },
|
||
cycles = { INT64_MIN, INT64_MAX };
|
||
struct ctf_trace *tin = container_of(td_read, struct ctf_trace, parent);
|
||
/* At least one of the two return args must be provided. */
|
||
... | ... | |
* Return a negative value on error.
|
||
*/
|
||
int ctf_find_tc_stream_packet_intersection_union(struct bt_context *ctx,
|
||
uint64_t *_ts_begin, uint64_t *_ts_end)
|
||
int64_t *_ts_begin, int64_t *_ts_end)
|
||
{
|
||
int ret = 0, i;
|
||
uint64_t ts_begin = UINT64_MAX, ts_end = 0;
|
||
int64_t ts_begin = INT64_MAX, ts_end = INT64_MIN;
|
||
if (!ctx || !ctx->tc || !ctx->tc->array || !_ts_begin || !_ts_end) {
|
||
ret = -EINVAL;
|
formats/ctf/iterator.c | ||
---|---|---|
struct bt_iter_pos **inter_end_pos)
|
||
{
|
||
int ret;
|
||
uint64_t begin, end;
|
||
int64_t begin, end;
|
||
/*
|
||
* The iterator's range is the union of each trace's intersection of
|
include/babeltrace/ctf/events-internal.h | ||
---|---|---|
struct packet_index *prev_index,
|
||
struct packet_index *cur_index);
|
||
int ctf_find_tc_stream_packet_intersection_union(struct bt_context *ctx,
|
||
uint64_t *ts_begin, uint64_t *ts_end);
|
||
int64_t *ts_begin, int64_t *ts_end);
|
||
int ctf_tc_set_stream_intersection_mode(struct bt_context *ctx);
|
||
#endif /*_BABELTRACE_CTF_EVENTS_INTERNAL_H */
|
include/babeltrace/iterator.h | ||
---|---|---|
struct bt_iter_pos {
|
||
enum bt_iter_pos_type type;
|
||
union {
|
||
uint64_t seek_time;
|
||
int64_t seek_time;
|
||
struct bt_saved_pos *restore;
|
||
} u;
|
||
};
|
||
... | ... | |
* real timestamp.
|
||
*/
|
||
struct bt_iter_pos *bt_iter_create_time_pos(struct bt_iter *iter,
|
||
uint64_t timestamp);
|
||
int64_t timestamp);
|
||
#ifdef __cplusplus
|
||
}
|
lib/iterator.c | ||
---|---|---|
}
|
||
struct bt_iter_pos *bt_iter_create_time_pos(struct bt_iter *unused,
|
||
uint64_t timestamp)
|
||
int64_t timestamp)
|
||
{
|
||
struct bt_iter_pos *pos;
|
||