Useful when dealing with dmesg logs which have 0-value timestamp.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- if (stream->timestamp) {
+ if (stream->has_timestamp) {
if (pos->print_names)
fprintf(pos->fp, "timestamp = ");
else
if (pos->print_names)
fprintf(pos->fp, "timestamp = ");
else
+ stream->has_timestamp = 0;
integer_definition = lookup_integer(&stream->stream_event_header->p, "timestamp", FALSE);
if (integer_definition) {
ctf_update_timestamp(stream, integer_definition);
integer_definition = lookup_integer(&stream->stream_event_header->p, "timestamp", FALSE);
if (integer_definition) {
ctf_update_timestamp(stream, integer_definition);
+ stream->has_timestamp = 1;
} else {
if (variant) {
integer_definition = lookup_integer(variant, "timestamp", FALSE);
if (integer_definition) {
ctf_update_timestamp(stream, integer_definition);
} else {
if (variant) {
integer_definition = lookup_integer(variant, "timestamp", FALSE);
if (integer_definition) {
ctf_update_timestamp(stream, integer_definition);
+ stream->has_timestamp = 1;
struct ctf_stream {
struct ctf_stream_class *stream_class;
uint64_t timestamp; /* Current timestamp, in ns */
struct ctf_stream {
struct ctf_stream_class *stream_class;
uint64_t timestamp; /* Current timestamp, in ns */
uint64_t stream_id;
struct definition_struct *trace_packet_header;
uint64_t stream_id;
struct definition_struct *trace_packet_header;