2 * Copyright (C) 2013 Julien Desfossez <jdesfossez@efficios.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation;
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #include <lib/babeltrace/ctf/types.h>
22 #include <lib/babeltrace/ctf-ir/metadata.h>
23 #include <lib/babeltrace/clock-internal.h>
24 #include "lttng-index.h"
26 /* Copied from babeltrace/formats/ctf/events-private.h */
28 uint64_t ctf_get_real_timestamp(struct ctf_stream_definition
*stream
,
32 struct ctf_trace
*trace
= stream
->stream_class
->trace
;
33 struct trace_collection
*tc
= trace
->parent
.collection
;
36 if (tc
->clock_use_offset_avg
)
37 tc_offset
= tc
->single_clock_offset_avg
;
39 tc_offset
= trace
->parent
.single_clock
->offset
;
41 ts_nsec
= clock_cycles_to_ns(stream
->current_clock
, timestamp
);
42 ts_nsec
+= tc_offset
; /* Add offset */
46 int list_sessions(void);
47 int write_index_header(int fd
);
48 int attach_session(int id
);
49 void dump_packet_index(struct lttng_packet_index
*index
);
50 int get_next_index(int id
, struct packet_index
*index
);
51 void ctf_live_packet_seek(struct bt_stream_pos
*stream_pos
, size_t index
,
53 int open_trace(struct bt_context
**bt_ctx
);
54 int setup_network_live(char *hostname
);
This page took 0.034549 seconds and 5 git commands to generate.